Zend\Mvc\Controller\Plugin\Service\ForwardFactory::__invoke PHP Method

__invoke() public method

{@inheritDoc}
public __invoke ( Interop\Container\ContainerInterface $container, $name, array $options = null ) : Forward
$container Interop\Container\ContainerInterface
$options array
return Zend\Mvc\Controller\Plugin\Forward
    public function __invoke(ContainerInterface $container, $name, array $options = null)
    {
        if (!$container->has('ControllerManager')) {
            throw new ServiceNotCreatedException(sprintf('%s requires that the application service manager contains a "%s" service; none found', __CLASS__, 'ControllerManager'));
        }
        $controllers = $container->get('ControllerManager');
        return new Forward($controllers);
    }