Remove "Incoming" and "Outgoing" concept
Closed this issue · 2 comments
gabesullice commented
I think the "incoming"/"outgoing" idea isn't really necessary here. A transformation is a transformation. It shouldn't matter in which context it's being applied. Let something at a higher level decide when to apply a transformation (i.e. on incoming or outgoing data (who cares?))
I think what you want instead, is "reversible" or "undoable". So:
class OneWayTransform extends TransformationBase {
public function doTransform() {}
}
class TwoWayTransform extends OneWayTransform implements ReversibleTransformationInterface {
public function undoTransform() {}
}
e0ipso commented
I like this pattern. I'll give it a try. I fear that the documentation of the library will be a bit more complex without the self-explanatory method names.