TYPE-0 PERFECT SEIHA
Server Info:
FreeBSD scimitar.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-4f2925105 GENERIC amd64
Software:
Apache
User:
www
Crot
Crot File
Crot Dir
Crot Command
[LockSelf]
[HOME]
data
www
19068
fszoo_net
download
app
Nette
Latte
Macros
Show Hidden Files
Edit File: /data/www/19068/fszoo_net/download/app/Nette/Latte/Macros/CacheMacro.php
<?php /** * This file is part of the Nette Framework (http://nette.org) * * Copyright (c) 2004 David Grudl (http://davidgrudl.com) * * For the full copyright and license information, please view * the file license.txt that was distributed with this source code. */ namespace Nette\Latte\Macros; use Nette, Nette\Latte; /** * Macro {cache} ... {/cache} * * @author David Grudl */ class CacheMacro extends Nette\Object implements Latte\IMacro { /** @var bool */ private $used; /** * Initializes before template parsing. * @return void */ public function initialize() { $this->used = FALSE; } /** * Finishes template parsing. * @return array(prolog, epilog) */ public function finalize() { if ($this->used) { return array('Nette\Latte\Macros\CacheMacro::initRuntime($template, $_g);'); } } /** * New node is found. * @return bool */ public function nodeOpened(Latte\MacroNode $node) { $this->used = TRUE; $node->isEmpty = FALSE; $node->openingCode = Latte\PhpWriter::using($node) ->write('<?php if (Nette\Latte\Macros\CacheMacro::createCache($netteCacheStorage, %var, $_g->caches, %node.array?)) { ?>', Nette\Utils\Strings::random() ); } /** * Node is closed. * @return void */ public function nodeClosed(Latte\MacroNode $node) { $node->closingCode = '<?php $_l->tmp = array_pop($_g->caches); if (!$_l->tmp instanceof stdClass) $_l->tmp->end(); } ?>'; } /********************* run-time helpers ****************d*g**/ /** * @return void */ public static function initRuntime(Nette\Templating\FileTemplate $template, \stdClass $global) { if (!empty($global->caches)) { end($global->caches)->dependencies[Nette\Caching\Cache::FILES][] = $template->getFile(); } } /** * Starts the output cache. Returns Nette\Caching\OutputHelper object if buffering was started. * @param Nette\Caching\IStorage * @param string * @param Nette\Caching\OutputHelper[] * @param array * @return Nette\Caching\OutputHelper */ public static function createCache(Nette\Caching\IStorage $cacheStorage, $key, & $parents, array $args = NULL) { if ($args) { if (array_key_exists('if', $args) && !$args['if']) { return $parents[] = new \stdClass; } $key = array_merge(array($key), array_intersect_key($args, range(0, count($args)))); } if ($parents) { end($parents)->dependencies[Nette\Caching\Cache::ITEMS][] = $key; } $cache = new Nette\Caching\Cache($cacheStorage, 'Nette.Templating.Cache'); if ($helper = $cache->start($key)) { if (isset($args['expire'])) { $args['expiration'] = $args['expire']; // back compatibility } $helper->dependencies = array( Nette\Caching\Cache::TAGS => isset($args['tags']) ? $args['tags'] : NULL, Nette\Caching\Cache::EXPIRATION => isset($args['expiration']) ? $args['expiration'] : '+ 7 days', ); $parents[] = $helper; } return $helper; } }
Crotin
Name
Size
Permissions
Modified
User/Group
MacroSet.php
2552
0644
2015-08-08 18:27:52
Unknown/Unknown
FormMacros.php
4118
0644
2015-08-08 18:27:52
Unknown/Unknown
UIMacros.php
16671
0644
2015-08-08 18:27:52
Unknown/Unknown
CoreMacros.php
11316
0644
2015-08-08 18:27:52
Unknown/Unknown
CacheMacro.php
2950
0644
2015-08-08 18:27:52
Unknown/Unknown
NGANU
Rename
Hapus
Chmod
Chown
Touch
Zip
Unzip
Download
Crotin