当前位置: 首页>>代码示例>>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;未经允许,请勿转载。