API16

JCacheStorageMemcache/ construct: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: ===Description=== Constructor <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> ...
 
m preparing for archive only
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
Constructor
Constructor


<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JCacheStorageMemcache/__construct|Edit Descripton]]<nowiki>]</nowiki>
</span>


{{Description:JCacheStorageMemcache/__construct}}
 
<! removed transcluded page call, red link never existed >


===Syntax===
===Syntax===
Line 45: Line 43:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JCacheStorageMemcache/__construct|Edit See Also]]<nowiki>]</nowiki>
<! removed transcluded page call, red link never existed >
</span>
{{SeeAlso:JCacheStorageMemcache/__construct}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=__construct
  category=__construct
  category=JCacheStorageMemcache
  category=JCacheStorageMemcache
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>
[[Category:Archived pages API16]]

Latest revision as of 01:23, 25 March 2017

Description

Constructor


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

Syntax

__construct($options=array())
Parameter Name Default Value Description
$options array() $options optional parameters

Defined in

libraries/joomla/cache/storage/memcache.php

Importing

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

Source Body

function __construct($options = array())
{
        if (!$this->test()) {
                return JError::raiseError(404, "THE_MEMCACHE_EXTENSION_IS_NOT_AVAILABLE");
        }
        parent::__construct($options);

        $params = &JCacheStorageMemcache::getConfig();
        $this->_compress        = (isset($params['compression'])) ? $params['compression'] : 0;
        $this->_db = &JCacheStorageMemcache::getConnection();

        // Get the site hash
        $this->_hash = $params['hash'];
}


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

Examples

Code Examples