Пример #1
0
 /**
  * Constructor.
  */
 public function __construct(Kernel $kernel)
 {
     $this->kernel = $kernel;
     parent::__construct('Symfony', Kernel::VERSION . ' - ' . $kernel->getName());
     $this->definition->addOption(new InputOption('--shell', '-s', InputOption::PARAMETER_NONE, 'Launch the shell.'));
     if (!$this->kernel->isBooted()) {
         $this->kernel->boot();
     }
     $this->registerCommands();
 }
Пример #2
0
 public function boot()
 {
     Symfony\Component\OutputEscaper\Escaper::markClassesAsSafe(array('Symfony\\Component\\Form\\Form', 'Symfony\\Component\\Form\\Field'));
     #TODO remove me
     foreach (array('ApplicationS2bBundleEntityUserProxy') as $class) {
         @(include_once __DIR__ . '/cache/' . $this->getEnvironment() . '/doctrine/orm/Proxies/' . $class . '.php');
     }
     return parent::boot();
 }
Пример #3
0
 public function boot()
 {
     Symfony\Component\OutputEscaper\Escaper::markClassesAsSafe(array('Symfony\\Component\\Form\\Form', 'Symfony\\Component\\Form\\Field'));
     //        #TODO remove me
     //        foreach(array('BundleDoctrineUserBundleEntityUserProxy', 'ApplicationMiamBundleEntityProjectProxy', 'ApplicationMiamBundleEntityStoryProxy', 'ApplicationMiamBundleEntitySprintProxy', 'ApplicationMiamBundleEntityTimelineEntryProxy') as $class) {
     //            require_once(__DIR__.'/cache/'.$this->getEnvironment().'/doctrine/orm/Proxies/'.$class.'.php');
     //        }
     return parent::boot();
 }
Пример #4
0
 public function __construct()
 {
     $this->tmpDir = sys_get_temp_dir() . '/sf2_' . rand(1, 9999);
     if (!is_dir($this->tmpDir)) {
         if (false === @mkdir($this->tmpDir)) {
             die(sprintf('Unable to create a temporary directory (%s)', $this->tmpDir));
         }
     } elseif (!is_writable($this->tmpDir)) {
         die(sprintf('Unable to write in a temporary directory (%s)', $this->tmpDir));
     }
     parent::__construct('env', true);
 }
Пример #5
0
 public function __construct($environment, $debug, $name)
 {
     parent::__construct($environment, $debug);
     $this->name = $name;
 }
 /**
  * Constructor.
  *
  * @param Kernel          $kernel A Kernel instance
  * @param LoggerInterface $logger A LoggerInterface instance
  */
 public function __construct(Kernel $kernel, LoggerInterface $logger = null)
 {
     $this->kernel = $kernel;
     $this->logger = $logger;
     $this->namespaces = array_keys($kernel->getBundleDirs());
 }