for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* Go! AOP framework
*
* @copyright Copyright 2016, Lisachenko Alexander <[email protected]>
* This source file is subject to the license that is bundled
* with this source code in the file LICENSE.
*/
namespace Go\ZF2\GoAopModule\Factory;
use Go\Core\AspectKernel;
use Interop\Container\ContainerInterface;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
class AspectContainerFactory implements FactoryInterface
{
/**
* Create service
* This method gains ZF3 compatibility
* @param ContainerInterface $container
* @param string $requestedName
* @param array $options
* @return mixed
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
return $this->createService($container);
}
* @param ServiceLocatorInterface $serviceLocator
public function createService(ServiceLocatorInterface $serviceLocator)
/** @var AspectKernel $kernel */
$kernel = $serviceLocator->get(AspectKernel::class);
return $kernel->getContainer();