Skip to content
This repository has been archived by the owner on Feb 19, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants