final public function addPreFilter($filter)
    {
        $this->resetPrepared();

        if (!$filter instanceof PHPTAL_PreFilter) {
            throw new PHPTAL_ConfigurationException("addPreFilter expects PHPTAL_PreFilter object");
        }

        $this->prefilters[] = $filter;
        return $this;
    }
final public function addPreFilter($filter)
    {
        $this->resetPrepared();

        if (!$filter instanceof PHPTAL_PreFilter) {
            throw new PHPTAL_ConfigurationException("addPreFilter expects PHPTAL_PreFilter object");
        }

        $this->prefilters[] = $filter;
        return $this;
    }
final public function addPreFilter ( $ filter ) { $ this -> resetPrepared ( ) ; if ( ! $ filter instanceof PHPTAL_PreFilter ) { throw new PHPTAL_ConfigurationException ( "addPreFilter expects PHPTAL_PreFilter object" ) ; } $ this -> prefilters [ ] = $ filter ; return $ this ; }
Add new prefilter to filter chain.
Prefilters are called only once template is compiled.

PreFilters must inherit PHPTAL_PreFilter class.
(in future this method will allow string with filter name instead of object)

@param mixed $filter PHPTAL_PreFilter object or name of prefilter to add

@return PHPTAL
Add new prefilter to filter chain . Prefilters are called only once template is compiled .