| [ Index ] |
PHP Cross Reference of Akelos Framework |
[Summary view] [Print] [Text view]
1 <?php 2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ 3 4 // +----------------------------------------------------------------------+ 5 // | Akelos Framework - http://www.akelos.org | 6 // +----------------------------------------------------------------------+ 7 // | Copyright (c) 2002-2006, Akelos Media, S.L. & Bermi Ferrer Martinez | 8 // | Released under the GNU Lesser General Public License, see LICENSE.txt| 9 // +----------------------------------------------------------------------+ 10 11 /** 12 * @package ActionView 13 * @subpackage Helpers 14 * @author Bermi Ferrer <bermi a.t akelos c.om> 15 * @copyright Copyright (c) 2002-2006, Akelos Media, S.L. http://www.akelos.org 16 * @license GNU Lesser General Public License <http://www.gnu.org/copyleft/lesser.html> 17 */ 18 19 20 /** 21 * Cache Helpers lets you cache fragments of templates 22 * 23 * == Caching a block into a fragment 24 * 25 * <b>Hello {name}</b> 26 * <?php if (!$cache_helper->begin()) { ?> 27 * All the topics in the system: 28 * <?= $controller->renderPartial("topic", $Topic->findAll()); ?> 29 * <?= $cache_helper->end();} ?> 30 * 31 * 32 * 33 * Normal view text 34 */ 35 36 require_once (AK_LIB_DIR.DS.'AkActionView'.DS.'AkActionViewHelper.php'); 37 38 class CacheHelper extends AkActionViewHelper 39 { 40 41 function begin($key = array(), $options = array()) 42 { 43 return $this->_controller->cacheTplFragmentStart($key, $options); 44 } 45 46 function end($key = array(), $options = array()) 47 { 48 return $this->_controller->cacheTplFragmentEnd($key, $options); 49 } 50 } 51 52 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Oct 27 12:43:49 2008 | Cross-referenced by PHPXref 0.6 |