Filters define which properties will be output by var_dump. You can use multiple filters for one class. Filters are defined at class level.
#[AddFilter(All:class)]
class Test
{
use ModifiedDump;
private $a;
private $b;
}To use multiple filters just use multiple AddFilter attributes.
The default filter is OnlyWithDumpAttribute, which requires properties to be attributes with #[Dump]
Filters have to implement the interface \Berbeflo\ModifyDump\Filter\Filter, which defines the method isAllowed with the signature isAllowed(ReflectionProperty $property, object $context): bool. If the property should be displayed, the method has to return true.
It also defines the method create which must return the filter instance.
Use the full qualified class name as argument for the AddFilter attribute.
A dummy filter if you don't want to exclude any properties. Always returns true.
A filter that exludes properties with the names password, pw and pass. Underscores will be ignored.
A filter that excludes all private properties.
A filter that excludes all protected properties.
A filter that excludes all public properties.
A filter that excludes all properties that aren't initialized.
A filter that excludes all properties that are not attributed with #[Dump].
A filter that excludes all properties that are attributed with #[NoDump].