/**
     * 
     * @param string $configDirectories
     * @param string $configFiles
     * @param string $cachePath
     * @param bool $debug
     */
    public function __construct($configDirectories, $configFiles, $cachePath, $debug = false)
    {
        $this->configDirectories = (array) $configDirectories;
        $this->configFiles = (array) $configFiles;
        $this->cachePath = $cachePath . '/faker_config.php';
        $configCache = new ConfigCache($this->cachePath, $debug);
        if (!$configCache->isFresh()) {
            $locator = new FileLocator($this->configDirectories);
            $loaderResolver = new LoaderResolver([new YamlLoader($locator)]);
            $delegatingLoader = new DelegatingLoader($loaderResolver);
            $resources = [];
            $config = [];
            foreach ($this->configFiles as $configFile) {
                $path = $locator->locate($configFile);
                $config = array_merge($config, $delegatingLoader->load($path));
                $resources[] = new FileResource($path);
            }
            $exportConfig = var_export($this->parseRawConfig(isset($config['faker']) ? $config['faker'] : []), true);
            $code = <<<PHP
<?php
return {$exportConfig};
PHP;
            $configCache->write($code, $resources);
        }
        if (file_exists($this->cachePath)) {
            $this->config = (include $this->cachePath);
        }
    }
 public function register(Container $app)
 {
     $app['router.options'] = [];
     $app['router.loader_resolver'] = function () {
         $fileLocator = new FileLocator();
         $loaderResolver = new LoaderResolver([new XmlFileLoader($fileLocator), new PhpFileLoader($fileLocator), new ClosureLoader()]);
         if (class_exists('Symfony\\Component\\Yaml\\Parser')) {
             $loaderResolver->addLoader(new YamlFileLoader($fileLocator));
         }
         return $loaderResolver;
     };
     $app['router'] = function (Application $app) {
         $router = new Router(new ClosureLoader(), function () use($app) {
             if (isset($app['router.resource'])) {
                 $userLoader = new DelegatingLoader($app['router.loader_resolver']);
                 $userRoutes = $userLoader->load($app['router.resource']);
                 $app['routes']->addCollection($userRoutes);
             }
             $app->flush();
             return $app['routes'];
         }, $app['router.options'] + ['debug' => isset($app['debug']) ? $app['debug'] : false, 'matcher_base_class' => 'Silex\\Provider\\Routing\\RedirectableUrlMatcher', 'matcher_class' => 'Silex\\Provider\\Routing\\RedirectableUrlMatcher'], $app['request_context'], $app['logger']);
         return $router;
     };
     $app['request_matcher'] = function (Application $app) {
         return $app['router'];
     };
     $app['url_generator'] = function (Application $app) {
         return $app['router'];
     };
 }
Example #3
0
 /**
  * @param ContainerBuilder $container
  *
  * @throws Exception\ConfigurationFileNotFoundException
  * @throws \Exception
  */
 public static function read(ContainerBuilder $container)
 {
     /** @var InputInterface $input */
     $input = $container->get('input');
     $locations = [getcwd(), getcwd() . '/.bldr/'];
     if ($input->hasParameterOption('--global')) {
         $locations = array_merge($locations, [getenv('HOME'), getenv('HOME') . '/.bldr/']);
     }
     $locator = new FileLocator($locations);
     $resolver = new LoaderResolver([new Loader\YamlFileLoader($container, $locator), new Loader\XmlFileLoader($container, $locator), new Loader\PhpFileLoader($container, $locator), new Loader\IniFileLoader($container, $locator), new Loader\JsonFileLoader($container, $locator), new Loader\TomlFileLoader($container, $locator)]);
     $loader = new DelegatingLoader($resolver);
     $files = static::findFiles($input);
     $foundConfig = false;
     foreach ($files as $file) {
         try {
             $loader->load($file);
             $foundConfig = true;
         } catch (\Exception $e) {
             if (get_class($e) !== 'InvalidArgumentException') {
                 throw $e;
             }
         }
     }
     if (!$foundConfig) {
         throw new ConfigurationFileNotFoundException(sprintf("Either couldn't find the configuration file, or couldn't read it. " . "Make sure the extension is valid (%s). Tried: %s", implode(', ', static::$TYPES), implode(', ', $files)));
     }
 }
 /**
  * {@inheritdoc}
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $locator = new FileLocator(__DIR__ . '/../Resources/config');
     $resolver = new LoaderResolver(array(new YamlFileLoader($container, $locator)));
     $loader = new DelegatingLoader($resolver);
     $loader->load('parameters.yml');
     $loader->load('services.yml');
 }
Example #5
0
 public function __construct()
 {
     parent::__construct();
     $fileLocator = new FileLocator(__DIR__ . '/../../config/');
     $resolver = new LoaderResolver(array(new XmlFileLoader($this, $fileLocator), new YamlFileLoader($this, $fileLocator)));
     $loader = new DelegatingLoader($resolver);
     $loader->load('services.yml');
 }
 /**
  * @expectedException \Symfony\Component\Config\Exception\FileLoaderLoadException
  */
 public function testLoadThrowsAnExceptionIfTheResourceCannotBeLoaded()
 {
     $loader = $this->getMock('Symfony\\Component\\Config\\Loader\\LoaderInterface');
     $loader->expects($this->once())->method('supports')->will($this->returnValue(false));
     $resolver = new LoaderResolver(array($loader));
     $loader = new DelegatingLoader($resolver);
     $loader->load('foo');
 }
Example #7
0
 /**
  * Get configuration
  *
  * @return array
  */
 public function getConfiguration()
 {
     $configurationFiles = $this->locator->locate('config.yml', null, false);
     $configurations = [];
     foreach ($configurationFiles as $path) {
         $configurations[] = $this->loader->load($path);
     }
     return $this->processor->processConfiguration($this->configuration, $configurations);
 }
Example #8
0
 public function setUp()
 {
     parent::setUp();
     $this->confContainer = new ConfContainer();
     $yfl = new YamlFileLoader($this->confContainer, new FileLocator(__DIR__ . '/../../Resources/config/'));
     $loaderResolver = new LoaderResolver(array($yfl));
     $delegatingLoader = new DelegatingLoader($loaderResolver);
     $delegatingLoader->load('config.yml');
 }
Example #9
0
 protected function loadConfigurations($configFile)
 {
     $locator = new FileLocator('.');
     $yaml = new YamlFileLoader($this->container, $locator);
     $xml = new XmlFileLoader($this->container, $locator);
     $delegatingLoader = new DelegatingLoader(new LoaderResolver(array($yaml, $xml)));
     $delegatingLoader->load($configFile);
     $this->container->compile();
 }
Example #10
0
 /**
  * Loads the configuration file
  *
  * @param string $configFile
  *
  * @throws FileLoaderLoadException
  *
  * @return array The loaded configuration
  */
 public function load($configFile)
 {
     $configDirectories = array(dirname($configFile));
     $locator = new FileLocator($configDirectories);
     $loaderResolver = new LoaderResolver(array(new Yaml($locator)));
     $delegatingLoader = new DelegatingLoader($loaderResolver);
     $config = $delegatingLoader->load($configFile);
     return $config;
 }
Example #11
0
 /**
  * @return mixed
  */
 public function load()
 {
     $rev = new LoaderResolver($this->loaders);
     $dloader = new DelegatingLoader($rev);
     foreach ($this->confFiles as $confFile) {
         $conf = $dloader->load($confFile);
         $this->conf = array_merge($this->conf, $conf);
     }
     return $this->conf;
 }
Example #12
0
 public function __construct(EntityManager $em, \Twig_Environment $twig, $themeDir)
 {
     $this->em = $em;
     $this->twig = $twig;
     $this->themeDir = $themeDir;
     $locator = new FileLocator($this->themeDir);
     $loaderResolver = new LoaderResolver([new YamlFileLoader($locator)]);
     $delegatingLoader = new DelegatingLoader($loaderResolver);
     $themeConfig = $delegatingLoader->load('theme.yml');
     $this->templates = $themeConfig['templates'];
 }
Example #13
0
 public function load($path, $filename)
 {
     $configDirectories = array($path);
     $locator = new FileLocator($configDirectories);
     $loaderResolver = new LoaderResolver(array(new YamlConfigLoader($locator)));
     $delegatingLoader = new DelegatingLoader($loaderResolver);
     $config = $delegatingLoader->load($filename);
     if (isset($config['parameters'])) {
         $config = $this->postProcessConfig($config, $config['parameters']);
     }
     return $config;
 }
Example #14
0
 /**
  * Load the services service definitions
  *
  * @param ContainerBuilder $containerBuilder
  * @param string|array     $files
  *
  * @throws FileLoaderLoadException
  */
 protected function loadServiceDefinitions(ContainerBuilder $containerBuilder, $files)
 {
     $locator = new FileLocator($this->getDefinitionPath($containerBuilder));
     $resolver = new LoaderResolver(array(new XmlFileLoader($containerBuilder, $locator), new YamlFileLoader($containerBuilder, $locator)) + $this->getExtraLoaders($containerBuilder));
     $loader = new DelegatingLoader($resolver);
     if (!is_array($files)) {
         $files = array($files);
     }
     foreach ($files as $file) {
         $loader->load($file);
     }
 }
Example #15
0
 /**
  * @param RouteCollection $collection
  *
  * @return RouteCollection
  */
 public function load()
 {
     if ($cachedCollection = $this->cache->fetch('collection.' . $this->type)) {
         $this->collection->addCollection($cachedCollection);
         return $this->collection;
     }
     $loaderResolver = new LoaderResolver($this->loaders);
     $delegatingLoader = new DelegatingLoader($loaderResolver);
     foreach ($this->resources as $resource) {
         $this->collection->addCollection($delegatingLoader->load($resource));
     }
     $this->cache->save('collection.' . $this->type, $this->collection);
     return $this->collection;
 }
Example #16
0
 public function register(Container $container)
 {
     $container['config'] = function () {
         $configDirectories = ['../config/', './config/'];
         $locator = new FileLocator($configDirectories);
         $loaderResolver = new LoaderResolver([new YamlFileLoader($locator)]);
         $delegatingLoader = new DelegatingLoader($loaderResolver);
         $something = $delegatingLoader->load('config.yml');
         $processor = new Processor();
         $configuration = new Configuration();
         $processedConfiguration = $processor->processConfiguration($configuration, [$something]);
         return $processedConfiguration;
     };
 }
Example #17
0
 /** Load configuration from array or file. */
 public static function load($config)
 {
     $loaderResolver = new LoaderResolver(array(new Config\ArrayConfigLoader(), new Config\JsonConfigLoader(), new Config\YamlConfigLoader()));
     $delegatingLoader = new DelegatingLoader($loaderResolver);
     try {
         $config = $delegatingLoader->load($config);
     } catch (FileLoaderLoadException $ex) {
         // Thrown when no loader matches given config
         throw new \Exception("Unsupported configuration format.", 0, $ex);
     }
     $processor = new Processor();
     $tree = self::getConfigTreeBuilder()->buildTree();
     $config = $processor->process($tree, array($config));
     self::$config = self::processConfig($config);
 }
 /**
  * Initialize the service container (and extensions), and load the config file
  *
  * @param \Symfony\Component\Console\Input\InputInterface $input
  * @param \Symfony\Component\Console\Output\OutputInterface $output
  *
  * @throws \Exception if user-provided configuration file causes an error
  */
 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     $root = $input->getArgument('root');
     // Setup container
     $containerBuilder = new ContainerBuilder();
     $extension = new BrancherExtension();
     $containerBuilder->registerExtension($extension);
     $containerBuilder->addCompilerPass(new ExtensionCompilerPass());
     $containerBuilder->addCompilerPass(new RegisterListenersPass('event_dispatcher', 'brancher.event_listener', 'brancher.event_subscriber'));
     // Try and load config file
     $locator = new FileLocator([getcwd(), $input->getArgument('root'), __DIR__ . '/../']);
     /** @var \Symfony\Component\DependencyInjection\Loader\FileLoader $loader */
     $loader = new DelegatingLoader(new LoaderResolver([new YamlFileLoader($containerBuilder, $locator), new XmlFileLoader($containerBuilder, $locator), new PhpFileLoader($containerBuilder, $locator), new IniFileLoader($containerBuilder, $locator)]));
     $config = null;
     try {
         $config = $locator->locate($input->getOption('config'));
         $loader->load($input->getOption('config'));
     } catch (\Exception $ex) {
         // Only rethrow if the issue was with the user-provided value
         if ($input->getOption('config') !== '_config.yml') {
             throw $ex;
         }
     }
     // Add in final config from command line options
     $containerBuilder->setParameter('castlepointanime.brancher.build.config', $config);
     $containerBuilder->loadFromExtension($extension->getAlias(), ['build' => array_filter(['config' => dirname($config) ?: $root, 'root' => $root, 'special' => $input->getOption('special'), 'output' => $input->getArgument('output'), 'templates' => array_filter(array_map('realpath', $input->getOption('template-dir')), 'is_dir'), 'data' => $input->getOption('data-dir'), 'exclude' => $input->getOption('exclude')])]);
     $containerBuilder->compile();
     $this->setContainer($containerBuilder);
 }
Example #19
0
 /**
  * @param $fullPath
  * @param $activeFormats
  * @param $globalOptions
  */
 protected function setFormatsFromFile($fullPath, &$activeFormats, $globalOptions)
 {
     $folder = dirname($fullPath);
     $fileName = basename($fullPath);
     $locator = new FileLocator($folder);
     $xmlLoader10 = new XmlFormatLoader10($locator);
     $xmlLoader11 = new XmlFormatLoader11($locator);
     $xmlLoader10->setGlobalOptions($globalOptions);
     $xmlLoader11->setGlobalOptions($globalOptions);
     $resolver = new LoaderResolver([$xmlLoader10, $xmlLoader11]);
     $loader = new DelegatingLoader($resolver);
     $themeFormats = $loader->load($fileName);
     foreach ($themeFormats as $format) {
         $activeFormats[$format['key']] = $format;
     }
 }
 /**
  * @return mixed
  * @throws \Exception
  * @throws \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
  */
 private function loadConfig()
 {
     $configDir = new FileLocator(static::$configDir);
     $loader = new YamlFileLoader($configDir);
     $loaderResolver = new LoaderResolver([$loader]);
     $delegatingLoader = new DelegatingLoader($loaderResolver);
     try {
         $config = $delegatingLoader->load(static::$configFileName);
         //var_dump($config);
         //$dumper = new YamlReferenceDumper();
         //$dumper->dump(new CursorCleanerConfiguration());
     } catch (InvalidConfigurationException $e) {
         echo $e->getMessage() . PHP_EOL;
         throw $e;
     }
     return $config;
 }
Example #21
0
 public function loadContainer()
 {
     if (empty($this->appDir) || empty($this->configDirectories)) {
         throw new \Exception(__CLASS__ . ': Missing required properties (appDir, configDirectories)');
     }
     $container = new ContainerBuilder();
     $container->setParameter('app_dir', $this->appDir);
     $container->setParameter('amp_src_dir', dirname(__DIR__));
     $container->setParameter('log_dir', $this->appDir . DIRECTORY_SEPARATOR . 'log');
     $container->setParameter('my_cnf_dir', $this->appDir . DIRECTORY_SEPARATOR . 'my.cnf.d');
     $container->setParameter('apache_dir', $this->appDir . DIRECTORY_SEPARATOR . 'apache.d');
     //$container->setParameter('apache24_dir', $this->appDir . DIRECTORY_SEPARATOR . 'apache.d');
     $container->setParameter('apache_tpl', implode(DIRECTORY_SEPARATOR, array(__DIR__, 'Templates', 'apache-vhost.php')));
     $container->setParameter('apache24_tpl', implode(DIRECTORY_SEPARATOR, array(__DIR__, 'Templates', 'apache24-vhost.php')));
     $container->setParameter('nginx_dir', $this->appDir . DIRECTORY_SEPARATOR . 'nginx.d');
     $container->setParameter('nginx_tpl', implode(DIRECTORY_SEPARATOR, array(__DIR__, 'Templates', 'nginx-vhost.php')));
     $container->setParameter('instances_yml', $this->appDir . DIRECTORY_SEPARATOR . 'instances.yml');
     $container->setParameter('config_yml', $this->appDir . DIRECTORY_SEPARATOR . 'services.yml');
     $container->setParameter('ram_disk_dir', $this->appDir . DIRECTORY_SEPARATOR . 'ram_disk');
     $fs = new Filesystem();
     $fs->mkdir(array($this->appDir, $container->getParameter('log_dir'), $container->getParameter('my_cnf_dir'), $container->getParameter('apache_dir'), $container->getParameter('nginx_dir')));
     $locator = new FileLocator($this->configDirectories);
     $loaderResolver = new LoaderResolver(array(new YamlFileLoader($container, $locator)));
     $delegatingLoader = new DelegatingLoader($loaderResolver);
     foreach (array('services.yml') as $file) {
         $yamlUserFiles = $locator->locate($file, NULL, FALSE);
         foreach ($yamlUserFiles as $file) {
             $delegatingLoader->load($file);
         }
     }
     if (getenv('AMP_INSTANCES_TIMEOUT')) {
         $container->setParameter('instances_timeout', getenv('AMP_INSTANCES_TIMEOUT'));
     }
     // TODO: If we load default configuration first, the version paramter will always be here.
     $dbParam = $container->hasParameter('db_type') ? 'db_type' : 'mysql_type';
     $container->setAlias('db', 'db.' . $container->getParameter($dbParam));
     $container->setAlias('httpd', 'httpd.' . $container->getParameter('httpd_type'));
     $container->setAlias('perm', 'perm.' . $container->getParameter('perm_type'));
     $container->setAlias('ram_disk', 'ram_disk.' . $container->getParameter('ram_disk_type'));
     $container->setAlias('hosts', 'hosts.' . $container->getParameter('hosts_type'));
     $this->container = $container;
 }
Example #22
0
 private function initializeConfig()
 {
     if ($this->loaded) {
         return;
     }
     $this->loaded = true;
     if ([] === ($filenames = (array) $this['config.filenames'])) {
         return;
     }
     $parameterBag = new EnvPlaceholderParameterBag($this['config.replacements']);
     $locator = new FileLocator();
     $loaders = [new PhpFileLoader($this, $locator), new DirectoryLoader($locator)];
     if (class_exists('Symfony\\Component\\Yaml\\Yaml')) {
         $loaders[] = new YamlFileLoader($this, $parameterBag, $locator);
     }
     $loader = new DelegatingLoader(new LoaderResolver($loaders));
     foreach ($filenames as $path) {
         $loader->load($parameterBag->resolveValue($path));
     }
 }
Example #23
0
 /**
  * @inheritdoc
  * @param mixed $resources
  */
 public function load($resources, $type = null)
 {
     $config = new Config();
     $config->setData($this->vars);
     foreach ((array) $resources as $resource) {
         $config->merge(parent::load($resource, $type));
     }
     foreach ($this->processors as $processor) {
         $processor->process($config);
     }
     return $config;
 }
Example #24
0
 /**
  * Read the config
  *
  * @param string $dir filepath to the package directory
  *
  * @return array the full config
  *
  * @throws \DomainException if the config is invalid
  */
 public function getConfig($dir)
 {
     // load
     try {
         // all this stuff is not really necessary but this component is kewl
         // and I want to use it.
         // A better configuration handling => better programing
         $delegatingLoader = new DelegatingLoader(new LoaderResolver(array(new Loader())));
         $config = $delegatingLoader->load($dir);
     } catch (FileLoaderLoadException $e) {
         $config = array();
     }
     // validates
     $processor = new Processor();
     $configuration = new Validator();
     try {
         $processedConfig = $processor->processConfiguration($configuration, array($config));
     } catch (InvalidConfigurationException $e) {
         throw new \DomainException($e->getMessage());
     }
     return $processedConfig;
 }
/**
 * @return array
 * @throws \Symfony\Component\Config\Exception\FileLoaderLoadException
 */
function loadConfig()
{
    $configCachePath = __DIR__ . '/cache/appConfigCache.php';
    $configCache = new ConfigCache($configCachePath, true);
    $configBag = new ConfigBag(['configs' => []]);
    if (!$configCache->isFresh()) {
        $locator = new FileLocator([__DIR__ . '/config']);
        $yamlLoader = new YamlConfigLoader($configBag, $locator);
        $loaderResolver = new LoaderResolver([$yamlLoader]);
        $delegatingLoader = new DelegatingLoader($loaderResolver);
        $delegatingLoader->load('config.yml');
        $delegatingLoader->load('config_extra.yml');
        $resources = [new FileResource($locator->locate('config.yml', null, true)), new FileResource($locator->locate('config_extra.yml', null, true))];
        $processor = new Processor();
        $configuration = new AppConfiguration();
        $processedConfig = $processor->processConfiguration($configuration, $configBag->get('configs'));
        $configCache->write(json_encode($processedConfig), $resources);
    } else {
        $path = $configCache->getPath();
        $processedConfig = json_decode(file_get_contents($path), true);
    }
    return $processedConfig;
}
 public function load()
 {
     $config = array();
     $yamlLoader = new YamlFileLoader($this->locator);
     $loaderResolver = new LoaderResolver(array($yamlLoader));
     $delegatingLoader = new DelegatingLoader($loaderResolver);
     foreach ($this->files as $filename) {
         $values = $delegatingLoader->load($filename);
         $config = array_replace_recursive($config, $values);
     }
     $replacements = $this->parameterBag->all();
     array_walk_recursive($config, function (&$item, $key, $replacements) {
         foreach ($replacements as $needle => $replace) {
             if (false !== strpos($item, '%' . $needle . '%')) {
                 $item = str_replace('%' . $needle . '%', $replace, $item);
             }
         }
     }, $replacements);
     // process configuration
     $processor = new Processor();
     $config = $processor->processConfiguration(new Configuration(), array($config));
     return $config;
 }
Example #27
0
 /**
  * Loads a resource.
  *
  * @param mixed  $resource A resource
  * @param string $type     The resource type
  *
  * @return RouteCollection A RouteCollection instance
  */
 public function load($resource, $type = null)
 {
     $collection = parent::load($resource, $type);
     foreach ($collection->all() as $route) {
         if ($controller = $route->getDefault('_controller')) {
             try {
                 $controller = $this->parser->parse($controller);
             } catch (\Exception $e) {
                 // unable to optimize unknown notation
             }
             $route->setDefault('_controller', $controller);
         }
     }
     return $collection;
 }
 /**
  * {@inheritdoc}
  */
 public function load($resource, $type = null)
 {
     if ($this->loading) {
         // This can happen if a fatal error occurs in parent::load().
         // Here is the scenario:
         // - while routes are being loaded by parent::load() below, a fatal error
         //   occurs (e.g. parse error in a controller while loading annotations);
         // - PHP abruptly empties the stack trace, bypassing all catch blocks;
         //   it then calls the registered shutdown functions;
         // - the ErrorHandler catches the fatal error and re-injects it for rendering
         //   thanks to HttpKernel->terminateWithException() (that calls handleException());
         // - at this stage, if we try to load the routes again, we must prevent
         //   the fatal error from occurring a second time,
         //   otherwise the PHP process would be killed immediately;
         // - while rendering the exception page, the router can be required
         //   (by e.g. the web profiler that needs to generate an URL);
         // - this handles the case and prevents the second fatal error
         //   by triggering an exception beforehand.
         throw new FileLoaderLoadException($resource);
     }
     $this->loading = true;
     try {
         $collection = parent::load($resource, $type);
     } catch (\Exception $e) {
         $this->loading = false;
         throw $e;
     } catch (\Throwable $e) {
         $this->loading = false;
         throw $e;
     }
     $this->loading = false;
     foreach ($collection->all() as $route) {
         if ($controller = $route->getDefault('_controller')) {
             try {
                 $controller = $this->parser->parse($controller);
             } catch (\InvalidArgumentException $e) {
                 // unable to optimize unknown notation
             }
             $route->setDefault('_controller', $controller);
         }
     }
     return $collection;
 }
 private function createListenerFactories(ContainerBuilder $container, $config)
 {
     if (null !== $this->factories) {
         return $this->factories;
     }
     // load service templates
     $c = new ContainerBuilder();
     $parameterBag = $container->getParameterBag();
     $locator = new FileLocator(__DIR__ . '/../Resources/config');
     $resolver = new LoaderResolver(array(new XmlFileLoader($c, $locator), new YamlFileLoader($c, $locator), new PhpFileLoader($c, $locator)));
     $loader = new DelegatingLoader($resolver);
     $loader->load('security_factories.xml');
     // load user-created listener factories
     foreach ($config['factories'] as $factory) {
         $loader->load($parameterBag->resolveValue($factory));
     }
     $tags = $c->findTaggedServiceIds('security.listener.factory');
     $factories = array();
     foreach ($this->listenerPositions as $position) {
         $factories[$position] = array();
     }
     foreach (array_keys($tags) as $tag) {
         $factory = $c->get($tag);
         $factories[$factory->getPosition()][] = $factory;
     }
     return $this->factories = $factories;
 }
Example #30
0
 public function __construct()
 {
     parent::__construct(new LoaderResolver());
 }