PHP Class DMS\Bundle\FilterBundle\Service\Filter

Provides filtering result based on annotation in the class.
Exibir arquivo Open project: rdohms/dms-filter-bundle Class Usage Examples

Public Methods

Method Description
__construct ( DMS\Filter\FilterInterface $filter ) Instantiates the Filter Service
filterEntity ( object $object ) Filter an object based on its annotations
filterProperty ( object $object, string $property ) Filters only a selected property of an entity
filterValue ( mixed $value, Rule[] | Rule $filter ) : mixed Runs a given value through one or more filter rules returning the filtered value
getFilterExecutor ( ) : Filter Retrieve the actual filter executor instance

Method Details

__construct() public method

Instantiates the Filter Service
public __construct ( DMS\Filter\FilterInterface $filter )
$filter DMS\Filter\FilterInterface

filterEntity() public method

Filter an object based on its annotations
public filterEntity ( object $object )
$object object

filterProperty() public method

Filters only a selected property of an entity
public filterProperty ( object $object, string $property )
$object object
$property string

filterValue() public method

Runs a given value through one or more filter rules returning the filtered value
public filterValue ( mixed $value, Rule[] | Rule $filter ) : mixed
$value mixed
$filter DMS\Filter\Rules\Rule[] | DMS\Filter\Rules\Rule
return mixed

getFilterExecutor() public method

Retrieve the actual filter executor instance
public getFilterExecutor ( ) : Filter
return DMS\Filter\Filter