__construct() public method

Constructor.
public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel )
$kernel Symfony\Component\HttpKernel\KernelInterface A KernelInterface instance
Example #1
0
 /**
  * Constructor.
  *
  * @param KernelInterface $kernel A KernelInterface instance
  */
 public function __construct(KernelInterface $kernel)
 {
     parent::__construct($kernel);
     $this->kernel = $kernel;
     $this->setName('Zikula');
     $this->setVersion(\Zikula_Core::VERSION_NUM . ' - ' . $kernel->getName() . '/' . $kernel->getEnvironment() . ($kernel->isDebug() ? '/debug' : ''));
 }
 public function __construct(KernelInterface $kernel)
 {
     parent::__construct($kernel);
     $this->getDefinition()->addOption(new InputOption('--jms-job-id', null, InputOption::VALUE_REQUIRED, 'The ID of the Job.'));
     $kernel->boot();
     if ($kernel->getContainer()->getParameter('jms_job_queue.statistics')) {
         $this->insertStatStmt = $this->getConnection()->prepare("INSERT INTO jms_job_statistics (job_id, characteristic, createdAt, charValue) VALUES (:jobId, :name, :createdAt, :value)");
         register_tick_function(array($this, 'onTick'));
     }
 }
 /**
  * {@inheritdoc}
  */
 public function __construct(KernelInterface $kernel)
 {
     parent::__construct($kernel);
     $this->setName('Rainmaker CLI');
     $this->setVersion('1.x-dev');
     $this->setDefaultTimezone();
     $this->getCommands();
     $this->addCommands($this->getCommands());
     $this->setDefaultCommand('welcome');
 }
 public function __construct(KernelInterface $kernel)
 {
     parent::__construct($kernel);
     // Boot kernel now
     $kernel->boot();
     // Get container
     $container = $kernel->getContainer();
     // Figure out environment
     $envName = $container->getParameter('kernel.environment');
     $releaseStage = $envName == 'prod' ? 'production' : $envName;
     // Setup Bugsnag to handle our errors
     \Bugsnag::register($container->getParameter('bugsnag.api_key'));
     \Bugsnag::setReleaseStage($releaseStage);
     \Bugsnag::setNotifyReleaseStages($container->getParameter('bugsnag.notify_stages'));
     \Bugsnag::setProjectRoot(realpath($container->getParameter('kernel.root_dir') . '/..'));
     // Attach to support reporting PHP errors
     set_error_handler("\\Bugsnag::errorHandler");
 }
 public function __construct(KernelInterface $kernel)
 {
     parent::__construct($kernel);
     $this->getDefinition()->addOption(new InputOption('--siteaccess', null, InputOption::VALUE_OPTIONAL, 'SiteAccess to use for operations. If not provided, default siteaccess will be used'));
 }
 /**
  * @param string $appDir
  * @param string $env
  * @param string $debug
  */
 public function __construct($appDir, $env, $debug = true)
 {
     FrameworkApplication::__construct(new \ToolsKernel($appDir, $env, $debug));
     ConsoleApplication::__construct(self::NAME, self::VERSION);
 }
Example #7
0
 /**
  * Constructs SK ITC Bundle Application Console
  *
  * @param KernelInterface $kernel
  * @param string $name
  * @param string $version
  */
 public function __construct(KernelInterface $kernel, $name = 'ITCloud Console', $version = '${project.version}')
 {
     parent::__construct($kernel);
     $this->setName($name);
     $this->setVersion($version);
 }