Skip to content
This repository has been archived by the owner on May 14, 2018. It is now read-only.

Introduction of getOrCreateService ignores options for Doctrine #60

Closed
japaveh opened this issue Jan 16, 2013 · 1 comment
Closed

Introduction of getOrCreateService ignores options for Doctrine #60

japaveh opened this issue Jan 16, 2013 · 1 comment

Comments

@japaveh
Copy link

japaveh commented Jan 16, 2013

As BjyAuthorize\Provider\Role\Doctrine is already known by the SL it will not create an new service and hence the $options are ignored.

/**
     * @param string $class
     * @param array  $options
     *
     * @return object
     */
    private function getOrCreateService($class, $options)
    {
        if ($this->serviceLocator->has($class)) {
            return $this->serviceLocator->get($class);
        }
        return new $class($options, $this->serviceLocator);
    }
@japaveh
Copy link
Author

japaveh commented Jan 16, 2013

Oh, and BjyAuthorize\Provider\Role\Doctrine requires a EntityManager as second argument and not the serviceLocator public function __construct(array $options, EntityManager $entityManager)

I will try to open some PR's tomorrow.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants