eko/FeedBundle — pull request #30 by eko (2014-05-08 11:14:28+00:00)
Title: Add hydrators to populate entities

I've added a way to write custom entity hydrators.

When you load feeds from XML files into a `Feed` instance and want to make it stick into your entity, you may need to write a custom hydrator. Now, you can do it.

If you have only one custom hydrator, just specify your custom hydrator service identifier in the bundle configuration like this:

```yaml
eko_feed:
hydrator: your_hydrator.custom.service # Optional, if you use entity hydrating with a custom hydrator
...
```

Maybe you have multiple hydrators, then, you can use your custom hydrators in PHP like this:

```php
$reader = $this->get('eko_feed.feed.reader');
$reader->setHydrator(new MyCustomHydrator());

$items = $reader->load('http://php.net/feed.atom')->populate('MyNamespace\Entity\Name');
```

Hope it can help some people to be more flexible with their feeds :)