Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
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 use Twig\Token;
16 use Twig\TokenParser\AbstractTokenParser;
17
18 /**
19 * Token Parser for the 'dump' tag.
20 *
21 * Dump variables with:
22 *
23 * {% dump %}
24 * {% dump foo %}
25 * {% dump foo, bar %}
26 *
27 * @author Julien Galenski <julien.galenski@gmail.com>
28 */
29 class DumpTokenParser extends AbstractTokenParser
30 {
31 /**
32 * {@inheritdoc}
33 */
34 public function parse(Token $token)
35 {
36 $values = null;
37 if (!$this->parser->getStream()->test(Token::BLOCK_END_TYPE)) {
38 $values = $this->parser->getExpressionParser()->parseMultitargetExpression();
39 }
40 $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
41
42 return new DumpNode($this->parser->getVarName(), $values, $token->getLine(), $this->getTag());
43 }
44
45 /**
46 * {@inheritdoc}
47 */
48 public function getTag()
49 {
50 return 'dump';
51 }
52 }
53