REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.50 KB
Close
/proc/thread-self/root/opt/cloudlinux/alt-php53/root/usr/share/pear/Symfony/Bridge/Twig/TokenParser/StopwatchTokenParser.php
Text
Base64
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Twig\TokenParser; use Symfony\Bridge\Twig\Node\StopwatchNode; /** * Token Parser for the stopwatch tag. * * @author Wouter J <wouter@wouterj.nl> */ class StopwatchTokenParser extends \Twig_TokenParser { protected $stopwatchIsAvailable; public function __construct($stopwatchIsAvailable) { $this->stopwatchIsAvailable = $stopwatchIsAvailable; } public function parse(\Twig_Token $token) { $lineno = $token->getLine(); $stream = $this->parser->getStream(); // {% stopwatch 'bar' %} $name = $this->parser->getExpressionParser()->parseExpression(); $stream->expect(\Twig_Token::BLOCK_END_TYPE); // {% endstopwatch %} $body = $this->parser->subparse(array($this, 'decideStopwatchEnd'), true); $stream->expect(\Twig_Token::BLOCK_END_TYPE); if ($this->stopwatchIsAvailable) { return new StopwatchNode($name, $body, new \Twig_Node_Expression_AssignName($this->parser->getVarName(), $token->getLine()), $lineno, $this->getTag()); } return $body; } public function decideStopwatchEnd(\Twig_Token $token) { return $token->test('endstopwatch'); } public function getTag() { return 'stopwatch'; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
FormThemeTokenParser.php
1.70 KB
lrw-r--r--
2019-12-18 11:20:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StopwatchTokenParser.php
1.50 KB
lrw-r--r--
2019-12-18 11:20:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TransChoiceTokenParser.php
2.46 KB
lrw-r--r--
2019-12-18 11:20:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TransDefaultDomainTokenParser.php
1.17 KB
lrw-r--r--
2019-12-18 11:20:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TransTokenParser.php
2.72 KB
lrw-r--r--
2019-12-18 11:20:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).