/** * 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(); }
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(); }
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(); }
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); }
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()); }