Zenify/DoctrineMethodsHydrator — pull request #5 by Olicek (2014-09-29 11:09:43+00:00)
Title: Support for custom find by methods

Hi,
I prepared PR, which adds a support for custom's methods from custom's class. Everything should work as well as before plus now in annotation, you can specify: 1) which entity you want and 2) class with a method which you want to use to return this entity. If it finds just one item, it returns entity, otherwise it returns array.

Sample:
```php
/**
*
* @hydratatorEntity \App\Entity\Article
* @hydratorDao \App\Dao\Articles
* @hydratorMethod findBySlug
*/
public function actionEdit($article = null)
{
dump($article); // entity object OR array of entity objects
}
```

If you are sure that the item will be just one, you can use type hint as before OR if it returns array, you can use array type hint.

It is without tests. If you like it, i will try to write tests.