public function filter($text, $config = array())
    {
        $context = $this->_chain->getContext();
        $context->data = $text;
        $context->config = $config;
        if ($context->config->filter) {
            $filter = (array) AnConfig::unbox($context->config->filter);
            $filter[] = 'ptag';
            $context->config->filter = $filter;
        }
        $this->_chain->run('filter', $context);

        return $context->data;
    }
public function filter($text, $config = array())
    {
        $context = $this->_chain->getContext();
        $context->data = $text;
        $context->config = $config;
        if ($context->config->filter) {
            $filter = (array) AnConfig::unbox($context->config->filter);
            $filter[] = 'ptag';
            $context->config->filter = $filter;
        }
        $this->_chain->run('filter', $context);

        return $context->data;
    }
public function filter ( $ text , $ config = array ( ) ) { $ context = $ this -> _chain -> getContext ( ) ; $ context -> data = $ text ; $ context -> config = $ config ; if ( $ context -> config -> filter ) { $ filter = ( array ) AnConfig :: unbox ( $ context -> config -> filter ) ; $ filter [ ] = 'ptag' ; $ context -> config -> filter = $ filter ; } $ this -> _chain -> run ( 'filter' , $ context ) ; return $ context -> data ; }
Alias for the sanitize method.

@param string $text   The text to be filtered
@param array  $config An Array of config

@return string
Alias for the sanitize method .