LeanMapper\Filtering::__construct PHP Метод

__construct() публичный Метод

public __construct ( array | string | Closur\Closure $filters, array $args = null, Entity $entity = null, Property $property = null, array $targetedArgs = [] )
$filters array | string | Closur\Closure
$args array
$entity Entity
$property LeanMapper\Reflection\Property
$targetedArgs array
    public function __construct($filters, array $args = null, Entity $entity = null, Property $property = null, array $targetedArgs = [])
    {
        if (!is_array($filters)) {
            if (!is_string($filters) and !$filters instanceof Closure) {
                throw new InvalidArgumentException("Argument \$filters must contain either string (name of filter), instance of Closure or array (with names of filters or instances of Closure).");
            }
            $filters = [$filters];
        }
        $this->filters = $filters;
        $this->args = $args !== null ? $args : [];
        $this->entity = $entity;
        $this->property = $property;
        $this->targetedArgs = $targetedArgs;
    }