3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Mvc\Service
;
13 use Interop\Container\ContainerInterface
;
15 trait HttpViewManagerConfigTrait
18 * Retrieve view_manager configuration, if present.
20 * @param ContainerInterface $container
23 private function getConfig(ContainerInterface
$container)
25 $config = $container->has('config') ?
$container->get('config') : [];
27 if (isset($config['view_manager'])
28 && (is_array($config['view_manager'])
29 ||
$config['view_manager'] instanceof ArrayAccess
32 return $config['view_manager'];