Preview::filter PHP Method

filter() public method

Register or get (a specific one or all) token filters
public filter ( string $key = NULL, string | closure $func = NULL ) : array | closure | string
$key string
$func string | closure
return array | closure | string
    function filter($key = NULL, $func = NULL)
    {
        if (!$key) {
            return array_keys($this->filter);
        }
        if (!$func) {
            return $this->filter[$key];
        }
        $this->filter[$key] = $func;
    }