PEEL Shopping
Open source ecommerce : PEEL Shopping
Public Member Functions | Protected Attributes
Twig_TokenParserBroker Class Reference

Default implementation of a token parser broker. More...

Inheritance diagram for Twig_TokenParserBroker:
Twig_TokenParserBrokerInterface

Public Member Functions

 __construct ($parsers=array(), $brokers=array())
 Constructor. More...
 
 addTokenParser (Twig_TokenParserInterface $parser)
 Adds a TokenParser. More...
 
 removeTokenParser (Twig_TokenParserInterface $parser)
 Removes a TokenParser. More...
 
 addTokenParserBroker (Twig_TokenParserBroker $broker)
 Adds a TokenParserBroker. More...
 
 removeTokenParserBroker (Twig_TokenParserBroker $broker)
 Removes a TokenParserBroker. More...
 
 getTokenParser ($tag)
 Gets a suitable TokenParser for a tag. More...
 
 getParsers ()
 
 getParser ()
 Gets the Twig_ParserInterface. More...
 
 setParser (Twig_ParserInterface $parser)
 Calls Twig_TokenParserInterface::setParser on all parsers the implementation knows of. More...
 

Protected Attributes

 $parser
 
 $parsers = array()
 
 $brokers = array()
 

Detailed Description

Default implementation of a token parser broker.

Author
Arnaud Le Blanc arnau.nosp@m.d.lb.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition at line 19 of file TokenParserBroker.php.

Constructor & Destructor Documentation

__construct (   $parsers = array(),
  $brokers = array() 
)

Constructor.

Parameters
array | Traversable$parsersA Traversable of Twig_TokenParserInterface instances
array | Traversable$brokersA Traversable of Twig_TokenParserBrokerInterface instances

Definition at line 31 of file TokenParserBroker.php.

Member Function Documentation

addTokenParser ( Twig_TokenParserInterface  $parser)

Adds a TokenParser.

Parameters
Twig_TokenParserInterface$parserA Twig_TokenParserInterface instance

Definition at line 52 of file TokenParserBroker.php.

addTokenParserBroker ( Twig_TokenParserBroker  $broker)

Adds a TokenParserBroker.

Parameters
Twig_TokenParserBroker$brokerA Twig_TokenParserBroker instance

Definition at line 75 of file TokenParserBroker.php.

getParser ( )

Gets the Twig_ParserInterface.

Returns
null|Twig_ParserInterface A Twig_ParserInterface instance or null

Implements Twig_TokenParserBrokerInterface.

Definition at line 121 of file TokenParserBroker.php.

getParsers ( )

Definition at line 116 of file TokenParserBroker.php.

getTokenParser (   $tag)

Gets a suitable TokenParser for a tag.

First looks in parsers, then in brokers.

Parameters
string$tagA tag name
Returns
null|Twig_TokenParserInterface A Twig_TokenParserInterface or null if no suitable TokenParser was found

Implements Twig_TokenParserBrokerInterface.

Definition at line 101 of file TokenParserBroker.php.

removeTokenParser ( Twig_TokenParserInterface  $parser)

Removes a TokenParser.

Parameters
Twig_TokenParserInterface$parserA Twig_TokenParserInterface instance

Definition at line 62 of file TokenParserBroker.php.

removeTokenParserBroker ( Twig_TokenParserBroker  $broker)

Removes a TokenParserBroker.

Parameters
Twig_TokenParserBroker$brokerA Twig_TokenParserBroker instance

Definition at line 85 of file TokenParserBroker.php.

setParser ( Twig_ParserInterface  $parser)

Calls Twig_TokenParserInterface::setParser on all parsers the implementation knows of.

Parameters
Twig_ParserInterface$parserA Twig_ParserInterface interface

Implements Twig_TokenParserBrokerInterface.

Definition at line 126 of file TokenParserBroker.php.

Field Documentation

$brokers = array()
protected

Definition at line 23 of file TokenParserBroker.php.

$parser
protected

Definition at line 21 of file TokenParserBroker.php.

$parsers = array()
protected

Definition at line 22 of file TokenParserBroker.php.


The documentation for this class was generated from the following file:

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