-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Conversation
…, my suggestion is to segregate this responsibilities at least with Interfaces.
I really really really like this :) 👍 It obviously calls for some more from the hydration component, but I guess that can't really live before zf3 |
It is would super great if this fix will be merged to the zf2. This fix will not harm zf2 , but it is will provide abilities to write more clear code. |
@spalax I'm talking about revising the hydrator interface, which is obviously out of discussion for 2.x |
I'd go a step further:
This will allow us to keep BC, while having fully segregated interfaces. |
@weierophinney doesn't |
@weierophinney agree. Will done soon. |
@weierophinney I think in future it is should not be Hydrator who implements Extraction and Hydration but Hydrator and Extractor as independent objects, and Abstract Manager (kind of Facade) who will be able to contains aggregation of Extractors and Hydrators and will implement interface with methods extract and hydrate. Does it make sense ? |
@bakura10 ping - you must see this |
Sounds good -- let's get these interfaces in first, and we can look at that for a later release and/or 3.0. Thanks again, @spalax :) |
Good idea, though it's a bit strange to have HydratorInterface implements HydrationInterface and ExtractionInterface, so I kinda like the idea of having two distinct interfaces. But we need a good name for having an interface that aggregate both. Maybe ConverterInterface, dunno. @Ocramius , I'll soon re-work on my hydrator refactor for ZF3, will try to get all those suggestions into account. |
I'll ask around. Don't have better ideas either. |
Segregation HydratorInterface
Merged to develop for release with 2.3.0. |
@weierophinney wasn't doubting that for 2.x the interface wouldn't change - we're just eager to experiment new approaches for 3.x |
…toring_extract_interface Segregation HydratorInterface
HydratorInterface contains two responsibilities it is Hydration and Extraction, my suggestion is to segregate this responsibilities at least with Interfaces. Some times you need only extract from objects who implement both hydrate and extract.