aliroCache Class Reference

Inheritance diagram for aliroCache:

aliroSimpleCache aliroBasicCache

List of all members.

Public Member Functions

 __construct ($group)
 call ()


Detailed Description

Definition at line 86 of file aliroCache.php.


Constructor & Destructor Documentation

aliroCache::__construct ( group  ) 

Reimplemented from aliroSimpleCache.

Definition at line 88 of file aliroCache.php.

References aliroSimpleCache::$group, and aliroCore::getInstance().

00088                                          {
00089         $this->caching = aliroCore::getInstance()->getCfg('caching') ? true : false;
00090         $this->livesite = aliroCore::getInstance()->getCfg('live_site');
00091         parent::__construct($group);
00092     }


Member Function Documentation

aliroCache::call (  ) 

Definition at line 94 of file aliroCache.php.

References aliroPathway::getInstance(), aliroRequest::getInstance(), and aliroSimpleCache::save().

00094                             {
00095         $arguments = func_get_args();
00096         $cached = $this->caching ? $this->get($arguments) : null;
00097         if (!$cached) {
00098             ob_start();
00099             ob_implicit_flush(false);
00100             $function = array_shift($arguments);
00101             call_user_func_array($function, $arguments);
00102             $html = ob_get_contents();
00103             ob_end_clean();
00104             $cached = new stdClass();
00105             $cached->html = $html;
00106             if ($this->caching) {
00107                 aliroRequest::getInstance()->setMetadataInCache($cached);
00108                 $cached->pathway = aliroPathway::getInstance()->getPathway();
00109                 $this->save($cached);
00110             }
00111         }
00112         else {
00113             aliroRequest::getInstance()->setMetadataFromCache($cached);
00114             aliroPathway::getInstance()->setPathway($cached->pathway);
00115         }
00116         echo $cached->html;
00117     }


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

Generated on Wed May 14 13:01:58 2008 for ALIRO by  doxygen 1.5.5