Dotclear


Ignore:
Timestamp:
02/15/13 08:35:19 (13 years ago)
Author:
Dsls <dsls@…>
Branch:
twig
Children:
1106:a4487f3ca4b4, 1147:2e5cb79e4782
Message:

Twig 1.12.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/libs/twig/TokenParserBroker.php

    r991 r1101  
    1414 * Default implementation of a token parser broker. 
    1515 * 
    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) 
    1819 */ 
    1920class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface 
     
    5657 
    5758    /** 
     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    /** 
    5872     * Adds a TokenParserBroker. 
    5973     * 
     
    6377    { 
    6478        $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        } 
    6591    } 
    6692 
Note: See TracChangeset for help on using the changeset viewer.

Sites map