web/lib/Zend/Cache/Frontend/Output.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Cache
    16  * @package    Zend_Cache
    17  * @subpackage Zend_Cache_Frontend
    17  * @subpackage Zend_Cache_Frontend
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @version    $Id: Output.php 20096 2010-01-06 02:05:09Z bkarwin $
    20  * @version    $Id: Output.php 24800 2012-05-13 11:59:32Z mabe $
    21  */
    21  */
    22 
    22 
    23 
    23 
    24 /**
    24 /**
    25  * @see Zend_Cache_Core
    25  * @see Zend_Cache_Core
    28 
    28 
    29 
    29 
    30 /**
    30 /**
    31  * @package    Zend_Cache
    31  * @package    Zend_Cache
    32  * @subpackage Zend_Cache_Frontend
    32  * @subpackage Zend_Cache_Frontend
    33  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    33  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    34  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    34  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    35  */
    35  */
    36 class Zend_Cache_Frontend_Output extends Zend_Cache_Core
    36 class Zend_Cache_Frontend_Output extends Zend_Cache_Core
    37 {
    37 {
    38 
    38 
    53     /**
    53     /**
    54      * Start the cache
    54      * Start the cache
    55      *
    55      *
    56      * @param  string  $id                     Cache id
    56      * @param  string  $id                     Cache id
    57      * @param  boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested
    57      * @param  boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested
    58      * @param  boolean $echoData               If set to true, datas are sent to the browser if the cache is hit (simpy returned else)
    58      * @param  boolean $echoData               If set to true, datas are sent to the browser if the cache is hit (simply returned else)
    59      * @return mixed True if the cache is hit (false else) with $echoData=true (default) ; string else (datas)
    59      * @return mixed True if the cache is hit (false else) with $echoData=true (default) ; string else (datas)
    60      */
    60      */
    61     public function start($id, $doNotTestCacheValidity = false, $echoData = true)
    61     public function start($id, $doNotTestCacheValidity = false, $echoData = true)
    62     {
    62     {
    63         $data = $this->load($id, $doNotTestCacheValidity);
    63         $data = $this->load($id, $doNotTestCacheValidity);
    86      * @return void
    86      * @return void
    87      */
    87      */
    88     public function end($tags = array(), $specificLifetime = false, $forcedDatas = null, $echoData = true, $priority = 8)
    88     public function end($tags = array(), $specificLifetime = false, $forcedDatas = null, $echoData = true, $priority = 8)
    89     {
    89     {
    90         if ($forcedDatas === null) {
    90         if ($forcedDatas === null) {
    91             $data = ob_get_contents();
    91             $data = ob_get_clean();
    92             ob_end_clean();
       
    93         } else {
    92         } else {
    94             $data =& $forcedDatas;
    93             $data =& $forcedDatas;
    95         }
    94         }
    96         $id = array_pop($this->_idStack);
    95         $id = array_pop($this->_idStack);
    97         if ($id === null) {
    96         if ($id === null) {