Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "Incoming" and "Outgoing" concept #4

Closed
gabesullice opened this issue Mar 7, 2018 · 2 comments
Closed

Remove "Incoming" and "Outgoing" concept #4

gabesullice opened this issue Mar 7, 2018 · 2 comments

Comments

@gabesullice
Copy link

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
Copy link
Owner

e0ipso commented Mar 8, 2018

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.

@e0ipso
Copy link
Owner

e0ipso commented Mar 8, 2018

Fixed by #6.

@e0ipso e0ipso closed this as completed Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants