Changeset 1101:7273894e61b8 for inc/libs/twig/TokenParserBroker.php
- Timestamp:
- 02/15/13 08:35:19 (13 years ago)
- Branch:
- twig
- Children:
- 1106:a4487f3ca4b4, 1147:2e5cb79e4782
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/libs/twig/TokenParserBroker.php
r991 r1101 14 14 * Default implementation of a token parser broker. 15 15 * 16 * @package twig 17 * @author Arnaud Le Blanc <arnaud.lb@gmail.com> 16 * @package twig 17 * @author Arnaud Le Blanc <arnaud.lb@gmail.com> 18 * @deprecated since 1.12 (to be removed in 2.0) 18 19 */ 19 20 class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface … … 56 57 57 58 /** 59 * Removes a TokenParser. 60 * 61 * @param Twig_TokenParserInterface $parser A Twig_TokenParserInterface instance 62 */ 63 public function removeTokenParser(Twig_TokenParserInterface $parser) 64 { 65 $name = $parser->getTag(); 66 if (isset($this->parsers[$name]) && $parser === $this->parsers[$name]) { 67 unset($this->parsers[$name]); 68 } 69 } 70 71 /** 58 72 * Adds a TokenParserBroker. 59 73 * … … 63 77 { 64 78 $this->brokers[] = $broker; 79 } 80 81 /** 82 * Removes a TokenParserBroker. 83 * 84 * @param Twig_TokenParserBroker $broker A Twig_TokenParserBroker instance 85 */ 86 public function removeTokenParserBroker(Twig_TokenParserBroker $broker) 87 { 88 if (false !== $pos = array_search($broker, $this->brokers)) { 89 unset($this->brokers[$pos]); 90 } 65 91 } 66 92
Note: See TracChangeset
for help on using the changeset viewer.