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

Commit

Permalink
Resolves #43
Browse files Browse the repository at this point in the history
in the way described in Fix #1
  • Loading branch information
Chionsas committed Nov 2, 2012
1 parent 6c692f2 commit 8c68acc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/BjyAuthorize/Guard/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Controller implements GuardInterface, RuleProviderInterface, ResourceProviderInterface
{
protected $securityService;
protected $serviceLocator;

protected $rules = array();

Expand All @@ -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)
{
Expand Down
6 changes: 3 additions & 3 deletions src/BjyAuthorize/Guard/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Route implements GuardInterface, RuleProviderInterface, ResourceProviderInterface
{
protected $securityService;
protected $serviceLocator;

protected $rules = array();

Expand All @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/BjyAuthorize/Service/Authorize.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
Expand Down Expand Up @@ -86,7 +86,7 @@ public function setIdentityProvider(IdentityProvider $provider)
$this->identityProvider = $provider;
return $this;
}

public function getIdentityProvider()
{
return $this->identityProvider;
Expand Down

0 comments on commit 8c68acc

Please sign in to comment.