PHP Class DMS\Filter\ObjectWalker

Datei anzeigen Open project: rdohms/dms-filter Class Usage Examples

Protected Properties

Property Type Description
$filterLoader DMS\Filter\Filters\Loader\FilterLoaderInterface
$object object
$reflClass ReflectionClass

Public Methods

Method Description
__construct ( object $object, DMS\Filter\Filters\Loader\FilterLoaderInterface $filterLoader ) Constructor
applyFilterRule ( string $property, Rule $filterRule ) Applies a Filtering Rule to a property
applyFilterRules ( string $property, array $filterRules = [] ) Applies the selected rules to a property in the object

Private Methods

Method Description
getAccessibleReflectionProperty ( string $propertyName ) : ReflectionProperty Retrieves a property from the object and makes it visible
getPropertyValue ( string $propertyName ) : mixed Retrieves the value of the property, overcoming visibility problems
setPropertyValue ( $propertyName, mixed $value ) Overrides the value of a property, overcoming visibility problems

Method Details

__construct() public method

Constructor
public __construct ( object $object, DMS\Filter\Filters\Loader\FilterLoaderInterface $filterLoader )
$object object
$filterLoader DMS\Filter\Filters\Loader\FilterLoaderInterface

applyFilterRule() public method

Applies a Filtering Rule to a property
public applyFilterRule ( string $property, Rule $filterRule )
$property string
$filterRule DMS\Filter\Rules\Rule

applyFilterRules() public method

Applies the selected rules to a property in the object
public applyFilterRules ( string $property, array $filterRules = [] )
$property string
$filterRules array

Property Details

$filterLoader protected_oe property

protected FilterLoaderInterface,DMS\Filter\Filters\Loader $filterLoader
return DMS\Filter\Filters\Loader\FilterLoaderInterface

$object protected_oe property

protected object $object
return object

$reflClass protected_oe property

protected ReflectionClass $reflClass
return ReflectionClass