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;
}