API15

JCacheStorageMemcache/getConfig: Difference between revisions

From Joomla! Documentation

m removing red link to edit, no existant pages
m preparing for archive only
 
Line 46: Line 46:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=getConfig
  category=getConfig
  category=JCacheStorageMemcache
  category=JCacheStorageMemcache
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 00:23, 25 March 2017

Description

Return memcache related configuration

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

& getConfig()


Returns

array options

Defined in

libraries/joomla/cache/storage/memcache.php

Importing

jimport( 'joomla.cache.storage.memcache' );

Source Body

function &getConfig() {
        static $params = null;
        if(is_null($params)) {
                $config =& JFactory::getConfig();
                $params = $config->getValue('config.memcache_settings');
                if (!is_array($params)) {
                        $params = unserialize(stripslashes($params));
                }

                if (!$params) {
                        $params = array();
                }
                $params['hash'] = $config->getValue('config.secret');
        }
        return $params;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

Code Examples