Hoa central
Public Member Functions | Protected Attributes | List of all members
Hoa\Cache\Frontend\Output Class Reference
Inheritance diagram for Hoa\Cache\Frontend\Output:

Public Member Functions

 start ($id=null)
 
 end ()
 
- Public Member Functions inherited from Hoa\Cache\Frontend\Frontend
 __construct (Cache\Backend $backend)
 
 cleanCache ($lifetime=Cache::CLEAN_EXPIRED)
 
 getBackend ()
 
- Public Member Functions inherited from Hoa\Cache\Cache
 __construct (Array $parameters=[])
 
 getParameters ()
 
 ksort (Array &$array)
 

Protected Attributes

 $_level = []
 
- Protected Attributes inherited from Hoa\Cache\Frontend\Frontend
 $_backend = null
 

Additional Inherited Members

- Public Attributes inherited from Hoa\Cache\Cache
const CLEAN_ALL = -1
 
const CLEAN_EXPIRED = 0
 
const CLEAN_USER = 1
 
- Protected Member Functions inherited from Hoa\Cache\Cache
 makeId ($id=null)
 
 setId ($id)
 
 getId ()
 
 getIdMd5 ()
 
 removeId ()
 
- Static Protected Attributes inherited from Hoa\Cache\Cache
static $_id = []
 

Detailed Description

Class .

Ouput catching system for frontend cache.

Definition at line 47 of file Output.php.

Member Function Documentation

Hoa\Cache\Frontend\Output::end ( )

End an output buffering.

Returns
void

Definition at line 88 of file Output.php.

89  {
90  $content = '';
91  $md5 = $this->getIdMd5();
92 
93  while (ob_get_level() >= $this->_level[$md5]) {
94  $content .= ob_get_clean();
95  }
96 
97  $this->_backend->store($content);
98  $this->removeId();
99 
100  echo $content;
101 
102  return;
103  }
$content
Definition: Hoa.php:119

Here is the call graph for this function:

Hoa\Cache\Frontend\Output::start (   $id = null)

Start an output buffering.

Parameters
stringid ID of cache.
Returns
bool

Definition at line 64 of file Output.php.

65  {
66  $this->makeId($id);
67  $md5 = $this->getIdMd5();
68  $out = $this->_backend->load();
69 
70  if (false !== $out) {
71  echo $out;
72 
73  return false;
74  }
75 
76  ob_start();
77  ob_implicit_flush(false);
78  $this->_level[$md5] = ob_get_level();
79 
80  return true;
81  }
makeId($id=null)
Definition: Cache.php:162

Here is the call graph for this function:

Member Data Documentation

Hoa\Cache\Frontend\Output::$_level = []
protected

Definition at line 54 of file Output.php.


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