public function getFilter($filter)
    {
        if (!$filter instanceof AnFilterAbstract) {
            $filter = (string) $filter;

            if (!isset($this->_filters[$filter])) {
                if (is_string($filter) && strpos($filter, '.') === false) {
                    $identifier = clone $this->getIdentifier();
                    $identifier->path = array('filter');
                    $identifier->name = $filter;
                    register_default(array('identifier' => $identifier, 'prefix' => $this));
                } else {
                    $identifier = $this->getIdentifier($filter);
                }

                $this->_filters[$filter] = $this->getService($identifier);
            }

            $filter = $this->_filters[$filter];
        }

        return $filter;
    }
public function getFilter($filter)
    {
        if (!$filter instanceof AnFilterAbstract) {
            $filter = (string) $filter;

            if (!isset($this->_filters[$filter])) {
                if (is_string($filter) && strpos($filter, '.') === false) {
                    $identifier = clone $this->getIdentifier();
                    $identifier->path = array('filter');
                    $identifier->name = $filter;
                    register_default(array('identifier' => $identifier, 'prefix' => $this));
                } else {
                    $identifier = $this->getIdentifier($filter);
                }

                $this->_filters[$filter] = $this->getService($identifier);
            }

            $filter = $this->_filters[$filter];
        }

        return $filter;
    }
public function getFilter ( $ filter ) { if ( ! $ filter instanceof AnFilterAbstract ) { $ filter = ( string ) $ filter ; if ( ! isset ( $ this -> _filters [ $ filter ] ) ) { if ( is_string ( $ filter ) && strpos ( $ filter , '.' ) === false ) { $ identifier = clone $ this -> getIdentifier ( ) ; $ identifier -> path = array ( 'filter' ) ; $ identifier -> name = $ filter ; register_default ( array ( 'identifier' => $ identifier , 'prefix' => $ this ) ) ; } else { $ identifier = $ this -> getIdentifier ( $ filter ) ; } $ this -> _filters [ $ filter ] = $ this -> getService ( $ identifier ) ; } $ filter = $ this -> _filters [ $ filter ] ; } return $ filter ; }
Return a filter object.

@param string $filter Filter name

@return AnFilterChain
Return a filter object .