context.module File Reference

Go to the source code of this file.

Functions

<?phprequire('context.core.inc');define('CONTEXT_GET',
0);define('CONTEXT_SET',
1);define('CONTEXT_ISSET',
2);define('CONTEXT_CLEAR',
3);define('CONTEXT_CONDITION_MODE_OR',
0);define('CONTEXT_CONDITION_MODE_AND',
1);functioncontext_context($op=CONTEXT_GET, $namespace=NULL, $attribute=NULL, $value=NULL){static $context;$context=!$context?array():$context;switch($op){caseCONTEXT_GET:if(!$namespace){return $context;}elseif(isset($context[(string)$namespace])){if(is_array($context[(string)$namespace])&&isset($context[(string)$namespace][(string)$attribute])){return $context[(string)$namespace][(string)$attribute];}elseif(!$attribute){return
$context[(string)$namespace];}}break;caseCONTEXT_SET:if(is_string($namespace)||is_int($namespace)){if(!$attribute){$context[(string)$namespace]=array();returnTRUE;}if($value===NULL){if(is_string($attribute)||is_int($attribute)){$context[(string)$namespace][(string)$attribute]=TRUE;returnTRUE;}elseif(is_array($attribute)||is_object($attribute)){$context[(string)$namespace]=$attribute;returnTRUE;}}if((is_string($attribute)||is_int($attribute))&&$value!==NULL){$context[$namespace][$attribute]=$value;returnTRUE;}}break;caseCONTEXT_ISSET:if(!$namespace) returnFALSE;if(!$attribute){returnisset($context[$namespace]);}returnisset($context[$namespace][$attribute]);caseCONTEXT_CLEAR:$context=array();returnTRUE;}returnFALSE;}functioncontext_set($namespace,
$attribute=NULL, $value=NULL){returncontext_context(CONTEXT_SET,
$namespace, $attribute,
$value);}functioncontext_get($namespace=NULL, $attribute=NULL){returncontext_context(CONTEXT_GET, $namespace,
$attribute, NULL);}functioncontext_isset($namespace=NULL, $attribute=NULL){returncontext_context(CONTEXT_ISSET, $namespace,
$attribute, NULL);}functioncontext_exists($namespace=NULL, $attribute=NULL){returncontext_context(CONTEXT_ISSET, $namespace,
$attribute, NULL);}functioncontext_clear(){returncontext_context(CONTEXT_CLEAR);}functioncontext_ctools_plugin_type(){returnarray('plugins'=> 
array ( 'cache'=> TRUE, 'use hooks'=> TRUE, 'classes'=> array('handler'),)
<?phprequire('context.core.inc');define('CONTEXT_GET',
0);define('CONTEXT_SET',
1);define('CONTEXT_ISSET',
2);define('CONTEXT_CLEAR',
3);define('CONTEXT_CONDITION_MODE_OR',
0);define('CONTEXT_CONDITION_MODE_AND',
1);functioncontext_context($op=CONTEXT_GET, $namespace=NULL, $attribute=NULL, $value=NULL){static $context;$context=!$context?array():$context;switch($op){caseCONTEXT_GET:if(!$namespace){return $context;}elseif(isset($context[(string)$namespace])){if(is_array($context[(string)$namespace])&&isset($context[(string)$namespace][(string)$attribute])){return $context[(string)$namespace][(string)$attribute];}elseif(!$attribute){return
$context[(string)$namespace];}}break;caseCONTEXT_SET:if(is_string($namespace)||is_int($namespace)){if(!$attribute){$context[(string)$namespace]=array();returnTRUE;}if($value===NULL){if(is_string($attribute)||is_int($attribute)){$context[(string)$namespace][(string)$attribute]=TRUE;returnTRUE;}elseif(is_array($attribute)||is_object($attribute)){$context[(string)$namespace]=$attribute;returnTRUE;}}if((is_string($attribute)||is_int($attribute))&&$value!==NULL){$context[$namespace][$attribute]=$value;returnTRUE;}}break;caseCONTEXT_ISSET:if(!$namespace) returnFALSE;if(!$attribute){returnisset($context[$namespace]);}returnisset($context[$namespace][$attribute]);caseCONTEXT_CLEAR:$context=array();returnTRUE;}returnFALSE;}functioncontext_set($namespace,
$attribute=NULL, $value=NULL){returncontext_context(CONTEXT_SET,
$namespace, $attribute,
$value);}functioncontext_get($namespace=NULL, $attribute=NULL){returncontext_context(CONTEXT_GET, $namespace,
$attribute, NULL);}functioncontext_isset($namespace=NULL, $attribute=NULL){returncontext_context(CONTEXT_ISSET, $namespace,
$attribute, NULL);}functioncontext_exists($namespace=NULL, $attribute=NULL){returncontext_context(CONTEXT_ISSET, $namespace,
$attribute, NULL);}functioncontext_clear(){returncontext_context(CONTEXT_CLEAR);}functioncontext_ctools_plugin_type(){returnarray('plugins'=>
function 
context_context_plugins ()
function context_context_registry ()
function context_init ()
function context_preprocess_menu_link (&$variables)
function context_load ($name=NULL, $reset=FALSE)
function context_save ($context)
function context_delete ($context)
function context_export ($context, $indent= '')
function context_context_list ()
function context_cache_get ($key, $reset=FALSE)
function context_cache_set ($key, $value)
function context_enabled_contexts ($reset=FALSE)
function context_condition_met ($context, $condition, $reset=FALSE)
function context_active_contexts ()
function context_condition_map ($reset=FALSE)
function context_invalidate_cache ()
function context_flush_caches ()
function context_empty ($element)
function context_get_plugin ($type= 'condition', $key, $reset=FALSE)
function context_conditions ($reset=FALSE)
function context_reactions ($reset=FALSE)
function _context_registry ($key=NULL, $reset=FALSE)
function context_block_view_alter (&$data, $block)
function context_page_alter (&$page)
function context_preprocess_block (&$vars)


Generated on Thu Jun 20 02:24:18 2013 for Context by  doxygen 1.4.7