Permalink
Browse files

Merge branch 'authorize-initializer'

  • Loading branch information...
2 parents e750d26 + b4eb019 commit b56d13b5e39aa0ae5d3bfe09134aad7a19d2561d @bjyoungblood committed Sep 19, 2012
Showing with 15 additions and 0 deletions.
  1. +7 −0 Module.php
  2. +8 −0 src/BjyAuthorize/Service/AuthorizeAwareInterface.php
View
@@ -32,6 +32,13 @@ public function onBootstrap(EventInterface $e)
public function getServiceConfig()
{
return array(
+ 'initializers' => array(
+ function ($instance, $sm) {
+ if ($instance instanceof Service\AuthorizeAwareInterface) {
+ $instance->setAuthorizeService($sm->get('BjyAuthorize\Service\Authorize'));
+ }
+ }
+ ),
'factories' => array(
'BjyAuthorize\Service\Authorize' => 'BjyAuthorize\Service\AuthorizeFactory',
@@ -0,0 +1,8 @@
+<?php
+
+namespace BjyAuthorize\Service;
+
+interface AuthorizeAwareInterface
+{
+ public function setAuthorizeService(Authorize $auth);
+}

0 comments on commit b56d13b

Please sign in to comment.