當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Application::__construct方法代碼示例

本文整理匯總了PHP中Symfony\Bundle\FrameworkBundle\Console\Application::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::__construct方法的具體用法?PHP Application::__construct怎麽用?PHP Application::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Bundle\FrameworkBundle\Console\Application的用法示例。


在下文中一共展示了Application::__construct方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * 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' : ''));
 }
開發者ID:rojblake,項目名稱:core,代碼行數:12,代碼來源:Application.php

示例2: __construct

 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'));
     }
 }
開發者ID:ashutosh-srijan,項目名稱:findit_akeneo,代碼行數:10,代碼來源:Application.php

示例3: __construct

 /**
  * {@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');
 }
開發者ID:wackamole0,項目名稱:rainmaker-tool,代碼行數:13,代碼來源:Application.php

示例4: __construct

 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");
 }
開發者ID:wrep,項目名稱:bugsnag-php-symfony,代碼行數:18,代碼來源:BugsnagConsoleApplication.php

示例5: __construct

 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'));
 }
開發者ID:nlescure,項目名稱:ezpublish-kernel,代碼行數:5,代碼來源:Application.php

示例6: __construct

 /**
  * @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);
 }
開發者ID:kleijnweb,項目名稱:swagger-bundle-tools,代碼行數:10,代碼來源:Application.php

示例7: __construct

 /**
  * 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);
 }
開發者ID:slavomirkuzma,項目名稱:itc-bundle,代碼行數:13,代碼來源:Console.php


注:本文中的Symfony\Bundle\FrameworkBundle\Console\Application::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。