You can clone with
HTTPS or Subversion.
I was trying to make a hydrator and using filters. I made a small code to use a hydrator with annotations. And i came to the following problems:
->filter() does not have a generic interface. Sometimes only the propertyName is passed sometimes the \nameSpace\Class::Property
the FQCN is useful because then you can get the reflection information. But some combinations of hydrators and filters are not compatible.
(This is more a problem about the hydrators)
There are only filters used for extracting and not hydrating. Of course you can filter the array yourself before you hydrate but then it's not good for re-use of code and seperation of concerns.
Here is an example where filter takes class::property
Here is an example where filter takes propertyName
There is no example of the filter taking the property value (but it could, because the interface/standard doesn't specify that).
I need a filter that can take the value as well as a ReflectionProperty (or get a class + property to build the reflection property from there)
What about passing the hydrated/extraction object to the filter?
So basically modify filters to handle filter($propertyName, $object, $context)?
filter($propertyName, $object, $context)
Just a wild guess on how this could be enhanced.
That would be perfect, it won't be compatible with the current interface though. Maybe it will work, but the interface doesn't specify this.