Loading config/module.config.php +2 −12 Original line number Diff line number Diff line Loading @@ -92,12 +92,7 @@ return [ 'controller_plugins' => [ 'factories' => [ 'isAllowed' => function (ContainerInterface $container) { /* @var $authorize \BjyAuthorize\Service\Authorize */ $authorize = $container->get('BjyAuthorize\Service\Authorize'); return new BjyAuthorize\Controller\Plugin\IsAllowed($authorize); } 'isAllowed' => \BjyAuthorize\Controller\Plugin\IsAllowedFactory::class, ], ], Loading @@ -111,12 +106,7 @@ return [ 'view_helpers' => [ 'factories' => [ 'isAllowed' => function (ContainerInterface $container) { /* @var $authorize \BjyAuthorize\Service\Authorize */ $authorize = $container->get('BjyAuthorize\Service\Authorize'); return new \BjyAuthorize\View\Helper\IsAllowed($authorize); } 'isAllowed' => \BjyAuthorize\View\Helper\IsAllowedFactory::class, ], ], Loading src/BjyAuthorize/Controller/Plugin/IsAllowedFactory.php 0 → 100644 +23 −0 Original line number Diff line number Diff line <?php namespace BjyAuthorize\Controller\Plugin; use Interop\Container\ContainerInterface; class IsAllowedFactory { /** * * @param ContainerInterface $container * * @return IsAllowed */ public function __invoke(ContainerInterface $container, $requestedName, $options = null) { /* @var $authorize \BjyAuthorize\Service\Authorize */ $authorize = $container->get('BjyAuthorize\Service\Authorize'); return new IsAllowed($authorize); } } No newline at end of file src/BjyAuthorize/View/Helper/IsAllowedFactory.php 0 → 100644 +23 −0 Original line number Diff line number Diff line <?php namespace BjyAuthorize\View\Helper; use Interop\Container\ContainerInterface; class IsAllowedFactory { /** * * @param ContainerInterface $container * * @return IsAllowed */ public function __invoke(ContainerInterface $container, $requestedName, $options = null) { /* @var $authorize \BjyAuthorize\Service\Authorize */ $authorize = $container->get('BjyAuthorize\Service\Authorize'); return new IsAllowed($authorize); } } No newline at end of file Loading
config/module.config.php +2 −12 Original line number Diff line number Diff line Loading @@ -92,12 +92,7 @@ return [ 'controller_plugins' => [ 'factories' => [ 'isAllowed' => function (ContainerInterface $container) { /* @var $authorize \BjyAuthorize\Service\Authorize */ $authorize = $container->get('BjyAuthorize\Service\Authorize'); return new BjyAuthorize\Controller\Plugin\IsAllowed($authorize); } 'isAllowed' => \BjyAuthorize\Controller\Plugin\IsAllowedFactory::class, ], ], Loading @@ -111,12 +106,7 @@ return [ 'view_helpers' => [ 'factories' => [ 'isAllowed' => function (ContainerInterface $container) { /* @var $authorize \BjyAuthorize\Service\Authorize */ $authorize = $container->get('BjyAuthorize\Service\Authorize'); return new \BjyAuthorize\View\Helper\IsAllowed($authorize); } 'isAllowed' => \BjyAuthorize\View\Helper\IsAllowedFactory::class, ], ], Loading
src/BjyAuthorize/Controller/Plugin/IsAllowedFactory.php 0 → 100644 +23 −0 Original line number Diff line number Diff line <?php namespace BjyAuthorize\Controller\Plugin; use Interop\Container\ContainerInterface; class IsAllowedFactory { /** * * @param ContainerInterface $container * * @return IsAllowed */ public function __invoke(ContainerInterface $container, $requestedName, $options = null) { /* @var $authorize \BjyAuthorize\Service\Authorize */ $authorize = $container->get('BjyAuthorize\Service\Authorize'); return new IsAllowed($authorize); } } No newline at end of file
src/BjyAuthorize/View/Helper/IsAllowedFactory.php 0 → 100644 +23 −0 Original line number Diff line number Diff line <?php namespace BjyAuthorize\View\Helper; use Interop\Container\ContainerInterface; class IsAllowedFactory { /** * * @param ContainerInterface $container * * @return IsAllowed */ public function __invoke(ContainerInterface $container, $requestedName, $options = null) { /* @var $authorize \BjyAuthorize\Service\Authorize */ $authorize = $container->get('BjyAuthorize\Service\Authorize'); return new IsAllowed($authorize); } } No newline at end of file