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

Add a Factory::getHydrator that instanciates the result of getHydratorClass #26

Open
docteurklein opened this issue Aug 27, 2014 · 4 comments

Comments

@docteurklein
Copy link

So that the factory is a real one :)

@Ocramius
Copy link
Owner

@docteurklein PR? :D

@docteurklein
Copy link
Author

I should have done that, right :)

Unfortunalty, I just found out that I don't need an hydrator at the moment, so I'm not going to find time for it.

Technically, are we sure that an hydrator is always instanciable without ctor arguments?

@Ocramius
Copy link
Owner

@docteurklein yes, that's ensured by the factory:

$this->replaceConstructor($this->findOrCreateMethod($node, '__construct'));

It is a good suggestion btw, and it would simplify consumption of the library.

I'm not sure why I didn't implement it this way upfront, but I'll think about it: a reason is there for sure.

@docteurklein
Copy link
Author

otherwise, great work! I'm amazed by the usage of php-parser :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants