public function addFilter($name, $handler)
    {
        if (is_string($handler) && !is_callable($handler)) {
            $handler = new $handler();
        }

        $this->pug->filter($name, $handler);
    }
public function addFilter($name, $handler)
    {
        if (is_string($handler) && !is_callable($handler)) {
            $handler = new $handler();
        }

        $this->pug->filter($name, $handler);
    }
public function addFilter ( $ name , $ handler ) { if ( is_string ( $ handler ) && ! is_callable ( $ handler ) ) { $ handler = new $ handler ( ) ; } $ this -> pug -> filter ( $ name , $ handler ) ; }
Adds custom filter.

@param string   $name
@param callable $handler
Adds custom filter .