コード例 #1
0
 /**
  * Constructor.
  *
  * @param ContainerBuilder $container A ContainerBuilder instance
  * @param string|array     $paths A path or an array of paths where to look for resources
  */
 public function __construct(ContainerBuilder $container, $paths = array())
 {
     parent::__construct($container);
     if (!is_array($paths)) {
         $paths = array($paths);
     }
     $this->paths = $paths;
 }
コード例 #2
0
ファイル: AnnotationLoader.php プロジェクト: nuxwin/losolib
 public function __construct(ContainerBuilder $container)
 {
     parent::__construct($container);
     $this->annotations = array('LoSo\\Symfony\\Component\\DependencyInjection\\Loader\\Annotation\\Inject', 'LoSo\\Symfony\\Component\\DependencyInjection\\Loader\\Annotation\\Value');
     $this->reader = new AnnotationReader();
     $this->reader->setDefaultAnnotationNamespace('LoSo\\Symfony\\Component\\DependencyInjection\\Loader\\Annotation\\');
     //$this->reader->setAutoloadAnnotations(true);
     require_once __DIR__ . '/Annotation/Service.php';
     require_once __DIR__ . '/Annotation/Inject.php';
     require_once __DIR__ . '/Annotation/Value.php';
 }
コード例 #3
0
 /**
  * Customizes the Container instance.
  *
  * @param  Symfony\Component\DependencyInjection\ContainerInterface $container A ContainerInterface instance
  *
  * @return  Symfony\Component\DependencyInjection\BuilderConfiguration A BuilderConfiguration instance
  */
 public function buildContainer(ContainerInterface $container)
 {
     Loader::registerExtension(new ZendNavigationExtension());
 }