title: ZF2 ServiceLocatorAwareInterface getServiceLocator gives me the Zend\Validator\ValidatorPluginManager
body: <p>For my ZF2 form validation I need the entity manager in my custom validator. I Zend\ServiceManager\ServiceLocatorAwareInterface to get the service locator in my validator so I would be able to get the entitymanager from there.</p>
  
  <p>My problem is that this Zend\ServiceManager\ServiceLocatorAwareInterface::setServiceLocator injects the "Zend\Validator\ValidatorPluginManager" and not the desired ServiceLocator.</p>
  
  <p>Does anybody know how to solve this problem?</p>
  
  <p>My abstract controller</p>
  
  <pre><code>abstract class AbstractController extends AbstractActionController
  {    
      /**
       * This property contains the doctrine entitymanager.
       * @var Doctrine\ORM\EntityManager
       */
      protected $_entityManager;
  
      /**
       * This method returns the doctrine entitymanager.
       * @return \Doctrine\ORM\EntityManager
       */
      public function getEntityManager()
      {
          var_dump(spl_object_hash($this-&gt;getServiceLocator())); echo '&lt;br&gt;';
          if (null === $this-&gt;_entityManager)
              $this-&gt;_entityManager = $this-&gt;getServiceLocator()-&gt;get('doctrine.entitymanager.orm_default');
          return $this-&gt;_entityManager;
      }
  }
  </code></pre>
  
  <p>My validator:</p>
  
  <pre><code>class EntityUnique extends AbstractValidator implements ServiceLocatorAwareInterface
  {
      protected $_serviceLocator;
  
      public function setServiceLocator(ServiceLocatorInterface $serviceLocator)
      {
          var_dump(spl_object_hash($serviceLocator)); echo '&lt;br&gt;';
          $this-&gt;_serviceLocator = $serviceLocator;
      }
  
      function getServiceLocator()
      {
          return $this-&gt;_serviceLocator;
      }
  }
  </code></pre>
  
  <p>When executing this both var_dumps result in another object hash:</p>
  
  <pre><code>string(32) "000000005e4258390000000024a7f829"
  string(32) "000000005e425a2d0000000024a7f829" 
  </code></pre>