Skip to content
Browse files

Resolves #43

in the way described in Fix #1
  • Loading branch information...
1 parent 6c692f2 commit 8c68accf63889aa8145878403edb178fa436c7e3 Chionsas committed Nov 2, 2012
View
6 src/BjyAuthorize/Guard/Controller.php
@@ -11,7 +11,7 @@
class Controller implements GuardInterface, RuleProviderInterface, ResourceProviderInterface
{
- protected $securityService;
+ protected $serviceLocator;
protected $rules = array();
@@ -20,9 +20,9 @@ class Controller implements GuardInterface, RuleProviderInterface, ResourceProvi
*/
protected $listeners = array();
- public function __construct(array $rules, $security)
+ public function __construct(array $rules, $serviceLocator)
{
- $this->securityService = $security;
+ $this->serviceLocator = $serviceLocator;
foreach ($rules as $rule)
{
View
6 src/BjyAuthorize/Guard/Route.php
@@ -11,7 +11,7 @@
class Route implements GuardInterface, RuleProviderInterface, ResourceProviderInterface
{
- protected $securityService;
+ protected $serviceLocator;
protected $rules = array();
@@ -20,9 +20,9 @@ class Route implements GuardInterface, RuleProviderInterface, ResourceProviderIn
*/
protected $listeners = array();
- public function __construct(array $rules, $security)
+ public function __construct(array $rules, $serviceLocator)
{
- $this->securityService = $security;
+ $this->serviceLocator = $serviceLocator;
foreach ($rules as $rule)
{
View
4 src/BjyAuthorize/Service/Authorize.php
@@ -58,7 +58,7 @@ public function __construct(array $config = array(), ServiceLocatorInterface $se
if (isset($config['guards'])) {
foreach ($config['guards'] as $class => $options) {
- $this->addGuard(new $class($options, $this));
+ $this->addGuard(new $class($options, $serviceLocator));
}
}
}
@@ -86,7 +86,7 @@ public function setIdentityProvider(IdentityProvider $provider)
$this->identityProvider = $provider;
return $this;
}
-
+
public function getIdentityProvider()
{
return $this->identityProvider;

0 comments on commit 8c68acc

Please sign in to comment.
Something went wrong with that request. Please try again.