public function getFilter($filter)
    {
        //Create the complete identifier if a partial identifier was passed
        if (is_string($filter) && strpos($filter, '.') === false) {
            $identifier = clone $this->getIdentifier();
            $identifier->path = array('template', 'filter');
            $identifier->name = $filter;
        } else {
            $identifier = AnService::getIdentifier($filter);
        }

        if (!isset($this->_filters[$filter])) {
            register_default(array(
                'identifier' => $identifier,
                'prefix' => $this
            ));
            
            $filter = AnService::get($identifier);

            if (!($filter instanceof LibBaseTemplateFilterInterface)) {
                throw new LibBaseTemplateException("Template filter $identifier does not implement LibBaseTemplateFilterInterface");
            }
        } else {
            $filter = $this->_filters[$identifier->name];
        }

        return $filter;
    }
public function getFilter($filter)
    {
        //Create the complete identifier if a partial identifier was passed
        if (is_string($filter) && strpos($filter, '.') === false) {
            $identifier = clone $this->getIdentifier();
            $identifier->path = array('template', 'filter');
            $identifier->name = $filter;
        } else {
            $identifier = AnService::getIdentifier($filter);
        }

        if (!isset($this->_filters[$filter])) {
            register_default(array(
                'identifier' => $identifier,
                'prefix' => $this
            ));
            
            $filter = AnService::get($identifier);

            if (!($filter instanceof LibBaseTemplateFilterInterface)) {
                throw new LibBaseTemplateException("Template filter $identifier does not implement LibBaseTemplateFilterInterface");
            }
        } else {
            $filter = $this->_filters[$identifier->name];
        }

        return $filter;
    }
public function getFilter ( $ filter ) { //Create the complete identifier if a partial identifier was passed if ( is_string ( $ filter ) && strpos ( $ filter , '.' ) === false ) { $ identifier = clone $ this -> getIdentifier ( ) ; $ identifier -> path = array ( 'template' , 'filter' ) ; $ identifier -> name = $ filter ; } else { $ identifier = AnService :: getIdentifier ( $ filter ) ; } if ( ! isset ( $ this -> _filters [ $ filter ] ) ) { register_default ( array ( 'identifier' => $ identifier , 'prefix' => $ this ) ) ; $ filter = AnService :: get ( $ identifier ) ; if ( ! ( $ filter instanceof LibBaseTemplateFilterInterface ) ) { throw new LibBaseTemplateException ( "Template filter $identifier does not implement LibBaseTemplateFilterInterface" ) ; } } else { $ filter = $ this -> _filters [ $ identifier -> name ] ; } return $ filter ; }
Get a filter by identifier.

@return LibBaseTemplateFilterInterface
Get a filter by identifier .