I think we should simplify and just have this voter support the `Post` class. In other words, we don't need to put the class into an array and iterate, just use a string.

Then, a better way of seeing if the class matches (which includes proxies and other subclasses) is:

``` php
    $targetClass = 'Acme\DemoBundle\Entity\Post';

    return $targetClass === $class
                || is_subclass_of($class, $targetClass);
```

This is from the `entity_provider` cookbook entry.