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/MacroSet.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, Nette\Latte\MacroNode; /** * Base IMacro implementation. Allows add multiple macros. * * @author David Grudl */ class MacroSet extends Nette\Object implements Latte\IMacro { /** @var Latte\Compiler */ private $compiler; /** @var array */ private $macros; public function __construct(Latte\Compiler $compiler) { $this->compiler = $compiler; } public function addMacro($name, $begin, $end = NULL, $attr = NULL) { $this->macros[$name] = array($begin, $end, $attr); $this->compiler->addMacro($name, $this); return $this; } public static function install(Latte\Compiler $compiler) { return new static($compiler); } /** * Initializes before template parsing. * @return void */ public function initialize() { } /** * Finishes template parsing. * @return array(prolog, epilog) */ public function finalize() { } /** * New node is found. * @return bool */ public function nodeOpened(MacroNode $node) { if ($this->macros[$node->name][2] && $node->htmlNode) { $node->isEmpty = TRUE; $this->compiler->setContext(Latte\Compiler::CONTEXT_DOUBLE_QUOTED); $res = $this->compile($node, $this->macros[$node->name][2]); $this->compiler->setContext(NULL); if (!$node->attrCode) { $node->attrCode = "<?php $res ?>"; } } else { $node->isEmpty = !isset($this->macros[$node->name][1]); $res = $this->compile($node, $this->macros[$node->name][0]); if (!$node->openingCode) { $node->openingCode = "<?php $res ?>"; } } return $res !== FALSE; } /** * Node is closed. * @return void */ public function nodeClosed(MacroNode $node) { $res = $this->compile($node, $this->macros[$node->name][1]); if (!$node->closingCode) { $node->closingCode = "<?php $res ?>"; } } /** * Generates code. * @return string */ private function compile(MacroNode $node, $def) { $node->tokenizer->reset(); $writer = Latte\PhpWriter::using($node, $this->compiler); if (is_string($def)) { return $writer->write($def); } else { return Nette\Callback::create($def)->invoke($node, $writer); } } /** * @return Latte\Compiler */ public function getCompiler() { return $this->compiler; } }
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