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 |
SpacelessTokenParser.php
01 <?php
02
03 /*
04 * This file is part of Twig.
05 *
06 * (c) Fabien Potencier
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 Twig\TokenParser;
13
14 use Twig\Node\SpacelessNode;
15 use Twig\Token;
16
17 /**
18 * Remove whitespaces between HTML tags.
19 *
20 * {% spaceless %}
21 * <div>
22 * <strong>foo</strong>
23 * </div>
24 * {% endspaceless %}
25 * {# output will be <div><strong>foo</strong></div> #}
26 *
27 * @deprecated since Twig 2.7, to be removed in 3.0 (use the "spaceless" filter with the "apply" tag instead)
28 */
29 final class SpacelessTokenParser extends AbstractTokenParser
30 {
31 public function parse(Token $token)
32 {
33 $stream = $this->parser->getStream();
34 $lineno = $token->getLine();
35
36 @trigger_error(sprintf('The spaceless tag in "%s" at line %d is deprecated since Twig 2.7, use the "spaceless" filter with the "apply" tag instead.', $stream->getSourceContext()->getName(), $lineno), \E_USER_DEPRECATED);
37
38 $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
39 $body = $this->parser->subparse([$this, 'decideSpacelessEnd'], true);
40 $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
41
42 return new SpacelessNode($body, $lineno, $this->getTag());
43 }
44
45 public function decideSpacelessEnd(Token $token)
46 {
47 return $token->test('endspaceless');
48 }
49
50 public function getTag()
51 {
52 return 'spaceless';
53 }
54 }
55
56 class_alias('Twig\TokenParser\SpacelessTokenParser', 'Twig_TokenParser_Spaceless');
57