src/Extensions.php
public static function filter($name, $handler)
    {
        if (! $handler instanceof \Closure and ! in_array(Filter::class, class_implements($handler), false)) {
            throw new \InvalidArgumentException("Failed adding Filter. Provided handler for [{$name}] is not valid. Must either provide a \\Closure or classpath that impelments \\Docit\\Docit\\Contracts\\Filter");
        }

        static::$filters[ $name ] = $handler;
    }
public static function filter($name, $handler)
    {
        if (! $handler instanceof \Closure and ! in_array(Filter::class, class_implements($handler), false)) {
            throw new \InvalidArgumentException("Failed adding Filter. Provided handler for [{$name}] is not valid. Must either provide a \\Closure or classpath that impelments \\Docit\\Docit\\Contracts\\Filter");
        }

        static::$filters[ $name ] = $handler;
    }
public static function filter ( $ name , $ handler ) { if ( ! $ handler instanceof \ Closure and ! in_array ( Filter :: class , class_implements ( $ handler ) , false ) ) { throw new \ InvalidArgumentException ( "Failed adding Filter. Provided handler for [{$name}] is not valid. Must either provide a \\Closure or classpath that impelments \\Docit\\Docit\\Contracts\\Filter" ) ; } static :: $ filters [ $ name ] = $ handler ; }
Add a new filter to the registered filters list.

@param  string                                 $name
@param  \Closure|\Docit\Core\Contracts\Filter $handler
@return void
Add a new filter to the registered filters list .