Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Zend_Cache_Frontend_Capture Class Reference
Inheritance diagram for Zend_Cache_Frontend_Capture:
Zend_Cache_Core

Public Member Functions

 start ($id, array $tags, $extension=null)
 
 _flush ($data)
 
- Public Member Functions inherited from Zend_Cache_Core
 __construct ($options=array())
 
 setConfig (Zend_Config $config)
 
 setBackend (Zend_Cache_Backend $backendObject)
 
 getBackend ()
 
 setOption ($name, $value)
 
 getOption ($name)
 
 setLifetime ($newLifetime)
 
 load ($id, $doNotTestCacheValidity=false, $doNotUnserialize=false)
 
 test ($id)
 
 save ($data, $id=null, $tags=array(), $specificLifetime=false, $priority=8)
 
 remove ($id)
 
 clean ($mode='all', $tags=array())
 
 getIdsMatchingTags ($tags=array())
 
 getIdsNotMatchingTags ($tags=array())
 
 getIdsMatchingAnyTags ($tags=array())
 
 getIds ()
 
 getTags ()
 
 getFillingPercentage ()
 
 getMetadatas ($id)
 
 touch ($id, $extraLifetime)
 

Protected Attributes

 $_idStack = array()
 
 $_tags = array()
 
 $_extension = null
 
- Protected Attributes inherited from Zend_Cache_Core
 $_backend = null
 
 $_options
 
 $_specificOptions = array()
 
 $_extendedBackend = false
 
 $_backendCapabilities = array()
 

Additional Inherited Members

- Data Fields inherited from Zend_Cache_Core
const BACKEND_NOT_SUPPORTS_TAG = 'tags are not supported by the current backend'
 
const BACKEND_NOT_IMPLEMENTS_EXTENDED_IF = 'Current backend doesn\'t implement the Zend_Cache_Backend_ExtendedInterface, so this method is not available'
 
- Protected Member Functions inherited from Zend_Cache_Core
 _validateIdOrTag ($string)
 
 _validateTagsArray ($tags)
 
 _loggerSanity ()
 
 _log ($message, $priority=4)
 
 _id ($id)
 
- Static Protected Attributes inherited from Zend_Cache_Core
static $_directivesList = array('lifetime', 'logging', 'logger')
 

Detailed Description

Definition at line 36 of file Capture.php.

Member Function Documentation

◆ _flush()

_flush (   $data)

callback for output buffering (shouldn't really be called manually)

Parameters
string$dataBuffered output
Returns
string Data to send to browser

Definition at line 75 of file Capture.php.

76  {
77  $id = array_pop($this->_idStack);
78  if ($id === null) {
79  Zend_Cache::throwException('use of _flush() without a start()');
80  }
81  if ($this->_extension) {
82  $this->save(serialize(array($data, $this->_extension)), $id, $this->_tags);
83  } else {
84  $this->save($data, $id, $this->_tags);
85  }
86  return $data;
87  }
$id
Definition: fieldset.phtml:14
save($data, $id=null, $tags=array(), $specificLifetime=false, $priority=8)
Definition: Core.php:348
static throwException($msg, Exception $e=null)
Definition: Cache.php:205

◆ start()

start (   $id,
array  $tags,
  $extension = null 
)

Start the cache

Parameters
string$idCache id
Returns
mixed True if the cache is hit (false else) with $echoData=true (default) ; string else (datas)

Definition at line 58 of file Capture.php.

59  {
60  $this->_tags = $tags;
61  $this->_extension = $extension;
62  ob_start(array($this, '_flush'));
63  ob_implicit_flush(false);
64  $this->_idStack[] = $id;
65  return false;
66  }
$id
Definition: fieldset.phtml:14

Field Documentation

◆ $_extension

$_extension = null
protected

Definition at line 50 of file Capture.php.

◆ $_idStack

$_idStack = array()
protected

Definition at line 42 of file Capture.php.

◆ $_tags

$_tags = array()
protected

Definition at line 48 of file Capture.php.


The documentation for this class was generated from the following file: