ReplaceFilter
in package
implements
Filter
Tags
Table of Contents
Interfaces
- Filter
- Filter to apply to a property while copying an object
Properties
- $callback : callable
Methods
- __construct() : mixed
- apply() : mixed
- Replaces the object property by the result of the callback called with the object property.
Properties
$callback
protected
callable
$callback
Methods
__construct()
public
__construct(callable $callable) : mixed
Parameters
- $callable : callable
-
Will be called to get the new value for each property to replace
apply()
Replaces the object property by the result of the callback called with the object property.
public
apply(mixed $object, mixed $property, mixed $objectCopier) : mixed
Parameters
- $object : mixed
- $property : mixed
- $objectCopier : mixed