parseService() public static method

Deprecation:
public static parseService ( ServiceDefinition $definition, $config )
$definition ServiceDefinition
Ejemplo n.º 1
0
 /**
  * @param string|array $config
  */
 protected function setupMetadataParserFactory($config)
 {
     $builder = $this->getContainerBuilder();
     if (is_array($config) && empty($config['class'])) {
         $config['class'] = $this->defaults['metadataParserFactory'];
     }
     Compiler::parseService($builder->addDefinition($this->prefix('metadataParserFactory')), $config);
 }
 /**
  * @param array
  */
 protected function configureBuilder($config)
 {
     $builder = $this->getContainerBuilder();
     $builder->addDefinition($this->prefix('formBuilderFactory'))->setClass('Librette\\Doctrine\\Forms\\Builder\\FormBuilderFactory');
     $chain = $builder->addDefinition($this->prefix('builderChainHandler'))->setClass('Librette\\Doctrine\\Forms\\Builder\\Handlers\\ChainHandler');
     foreach (array_merge($config['handlers'], $this->defaultBuilderHandlers) as $i => $handler) {
         Compiler::parseService($def = $builder->addDefinition($this->prefix("builderHandler{$i}")), $handler);
         $def->setAutowired(FALSE);
         $chain->addSetup('add', [$def, FALSE]);
     }
     $builder->addDefinition($this->prefix('builderConfiguration'))->setClass('Librette\\Doctrine\\Forms\\Builder\\Configuration');
 }