public function run($text, $filter)
    {
        if (is_string($filter)) {
            $filter = $this->get($filter);
        }

        $filtered = null;
        $this->hook->attach('filter', $text, $filter, $filtered, $this);

        if (isset($filtered)) {
            return (string) $filtered;
        }

        return $this->filter($text);
    }
public function run($text, $filter)
    {
        if (is_string($filter)) {
            $filter = $this->get($filter);
        }

        $filtered = null;
        $this->hook->attach('filter', $text, $filter, $filtered, $this);

        if (isset($filtered)) {
            return (string) $filtered;
        }

        return $this->filter($text);
    }
public function run ( $ text , $ filter ) { if ( is_string ( $ filter ) ) { $ filter = $ this -> get ( $ filter ) ; } $ filtered = null ; $ this -> hook -> attach ( 'filter' , $ text , $ filter , $ filtered , $ this ) ; if ( isset ( $ filtered ) ) { return ( string ) $ filtered ; } return $ this -> filter ( $ text ) ; }
Filter a text string
@param string $text
@param string|array $filter
@return string
Filter a text string