PEEL Shopping
Open source ecommerce : PEEL Shopping
Spaceless.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of Twig.
5  *
6  * (c) 2010 Fabien Potencier
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11 
26 {
34  public function parse(Twig_Token $token)
35  {
36  $lineno = $token->getLine();
37 
38  $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
39  $body = $this->parser->subparse(array($this, 'decideSpacelessEnd'), true);
40  $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
41 
42  return new Twig_Node_Spaceless($body, $lineno, $this->getTag());
43  }
44 
45  public function decideSpacelessEnd(Twig_Token $token)
46  {
47  return $token->test('endspaceless');
48  }
49 
55  public function getTag()
56  {
57  return 'spaceless';
58  }
59 }
Base class for all token parsers.
Definition: TokenParser.php:17
Remove whitespaces between HTML tags.
Definition: Spaceless.php:25
decideSpacelessEnd(Twig_Token $token)
Definition: Spaceless.php:45
parse(Twig_Token $token)
Parses a token and returns a node.
Definition: Spaceless.php:34
const BLOCK_END_TYPE
Definition: Token.php:28
Represents a Token.
Definition: Token.php:18
getLine()
Gets the line.
Definition: Token.php:94
test($type, $values=null)
Tests the current token for a type and/or a value.
Definition: Token.php:75
getTag()
Gets the tag name associated with this token parser.
Definition: Spaceless.php:55
Represents a spaceless node.
Definition: Spaceless.php:19

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:19 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.