Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
DumpTokenParser.php
01 <?php
02
03 /*
04 * This file is part of the Symfony package.
05 *
06 * (c) Fabien Potencier <fabien@symfony.com>
07 *
08 * For the full copyright and license information, please view the LICENSE
09 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Bridge\Twig\TokenParser;
13
14 use Symfony\Bridge\Twig\Node\DumpNode;
15
16 /**
17 * Token Parser for the 'dump' tag.
18 *
19 * Dump variables with:
20 * <pre>
21 * {% dump %}
22 * {% dump foo %}
23 * {% dump foo, bar %}
24 * </pre>
25 *
26 * @author Julien Galenski <julien.galenski@gmail.com>
27 */
28 class DumpTokenParser extends \Twig_TokenParser
29 {
30 /**
31 * {@inheritdoc}
32 */
33 public function parse(\Twig_Token $token)
34 {
35 $values = null;
36 if (!$this->parser->getStream()->test(\Twig_Token::BLOCK_END_TYPE)) {
37 $values = $this->parser->getExpressionParser()->parseMultitargetExpression();
38 }
39 $this->parser->getStream()->expect(\Twig_Token::BLOCK_END_TYPE);
40
41 return new DumpNode($this->parser->getVarName(), $values, $token->getLine(), $this->getTag());
42 }
43
44 /**
45 * {@inheritdoc}
46 */
47 public function getTag()
48 {
49 return 'dump';
50 }
51 }
52