nelmio/NelmioApiDocBundle — pull request #155 by benbender (2013-03-22 13:13:47+00:00)
Title: Add a little bit more flexibility to ApiDocExtractor

A proposal for a small refactoring of ApiDocExtractor to allow a little bit more flexibility.

### Use-Case: ###
I have an application which I like to add an api for. I dont want to add doubled code for every method the Api should use. Therefor I added extra routes per annotation to the actions I want to be available in my api. So far so good.

If I now try to extract the api-doc for those actions, the routes are doubled because of the doubled Routes on those actions. These change allows me to do something like:

```php
$annotations = $apiDocExtractor->extractAnnotations(
new RouteFilterIterator(
$apiDocExtractor->getRoutes()
)
);
```

Where my RouteFilterIterator looks something like this:
```php
class ApiRouteFilterIterator extends \FilterIterator
{
public function accept()
{
return strstr($this->getInnerIterator()->key(), 'api_');
}
}
```