当前位置: 首页>>代码示例>>PHP>>正文


PHP Application::__construct方法代码示例

本文整理汇总了PHP中Illuminate\Console\Application::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::__construct方法的具体用法?PHP Application::__construct怎么用?PHP Application::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Console\Application的用法示例。


在下文中一共展示了Application::__construct方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Scanner constructor.
  *
  * @param Container|null  $container
  * @param Dispatcher|null $events
  */
 public function __construct(Container $container = null, Dispatcher $events = null)
 {
     $container = $container ?: new Container();
     $this->bindings($container, [EventServiceProvider::class, FilesystemServiceProvider::class, PipelineServiceProvider::class, AliasesServiceProvider::class, ConfigServiceProvider::class, VulnDBServiceProvider::class]);
     $events = $events ?: $container->make('events');
     parent::__construct($container, $events, static::VERSION);
     $this->setName('Wordpress Vulnerabilities Scanner');
 }
开发者ID:Zae,项目名称:wp-vulnerabilities,代码行数:14,代码来源:Scanner.php

示例2: __construct

 public function __construct($container)
 {
     parent::__construct('forge-cli', 0.1);
     $this->setLaravel($container);
     // Register the deploy command
     $this->add(new DeployCommand());
     $this->add(new AddSiteCommand());
 }
开发者ID:bramdevries,项目名称:forge-cli,代码行数:8,代码来源:Console.php

示例3: __construct

 /**
  * Setup the application
  */
 public function __construct()
 {
     parent::__construct('Satellite', '0.1.0');
     // Setup application's dependencies
     $app = new Container();
     $provider = new SatelliteServiceProvider($app);
     $provider->register();
     // Register services
     $this->laravel = $app;
     // Add commands
     $this->resolveCommands(array('Rocketeer\\Satellite\\Console\\Commands\\Setup', 'Rocketeer\\Satellite\\Console\\Commands\\ListApplications', 'Rocketeer\\Satellite\\Console\\Commands\\Deploy', 'Rocketeer\\Satellite\\Console\\Commands\\Update'));
 }
开发者ID:rocketeers,项目名称:satellite,代码行数:15,代码来源:Satellite.php

示例4: __construct

 public function __construct(Container $container)
 {
     parent::__construct('XenForo Developer Toolkit', '1.0-dev');
     $this->setContainer($container);
     $container['app'] = $this;
     $container->alias('app', 'Robbo\\XfToolkit\\Application');
     $container->bindShared('xenforo', function ($container) {
         return new XenForo($this, new Filesystem());
     });
     $container->alias('xenforo', 'Robbo\\XfToolkit\\XenForo');
     $this->registerBundledCommands();
 }
开发者ID:robclancy,项目名称:xf-toolkit,代码行数:12,代码来源:Application.php

示例5: __construct

 public function __construct()
 {
     $container = $this->initialize();
     if ($this->laravelVersion === 5) {
         parent::__construct($container, $container['events'], self::VERSION);
         $this->setCatchExceptions(true);
         $this->setName(self::NAME);
     } else {
         parent::__construct(self::NAME, self::VERSION);
         $this->setLaravel($container);
         $this->boot();
     }
     $this->loadMigrations($container);
 }
开发者ID:tomzx,项目名称:laravel-migration,代码行数:14,代码来源:Application.php

示例6: __construct

 /**
  * Console constructor.
  *
  * @param ConfigInterface $config
  * @param Paths           $paths
  * @param string          $version
  */
 public function __construct(ConfigInterface $config, Paths $paths, $version = \F9\Application\Application::VERSION)
 {
     $this->config = $config;
     $this->paths = $paths;
     /** @var Container $app */
     $app = Forge::find('app');
     // the parent is a hijacked copy of the illuminate console application.
     // we hijacked it mainly to override a few properties - such as the title.
     parent::__construct(forge('illuminate.container'), forge('illuminate.events'), $version);
     //$this->bootSettings();
     $this->configureEnvironment();
     // in all cases, register the framework commands
     $this->registerFrameworkCommands();
     // register the cloned artisan commands
     $this->registerArtisanCommands();
 }
开发者ID:formula9,项目名称:framework,代码行数:23,代码来源:Console.php

示例7: __construct

 /**
  * Application constructor.
  *
  * @param \Illuminate\Container\Container         $container
  * @param \Illuminate\Contracts\Events\Dispatcher $events
  * @param                                         $version
  */
 public function __construct(Container $container, Dispatcher $events, $version)
 {
     parent::__construct($container, $events, $version);
     $this->container = $container;
 }
开发者ID:notadd,项目名称:framework,代码行数:12,代码来源:Application.php

示例8: __construct

 public function __construct(Container $laravel, Dispatcher $events, $version)
 {
     parent::__construct($laravel, $events, $version);
     $this->setName(app()->getName());
 }
开发者ID:laradic-old,项目名称:illuminate,代码行数:5,代码来源:Artisan.php

示例9: __construct

 /**
  * Set application name
  *
  * @param Container $container
  * @param Dispatcher $events
  * @param string $version
  */
 public function __construct(Container $container, Dispatcher $events, $version)
 {
     parent::__construct($container, $events, $version);
     $this->setName('GitHook');
 }
开发者ID:adam-paterson,项目名称:githook,代码行数:12,代码来源:Console.php

示例10: __construct

 public function __construct(Container $laravel, Dispatcher $events, $version, SymfonyApplication $application)
 {
     $this->application = $application;
     parent::__construct($laravel, $events, $version);
 }
开发者ID:aprezcuba24,项目名称:CULabsIlluminateBundle,代码行数:5,代码来源:Application.php

示例11: __construct

 public function __construct(Container $laravel, Dispatcher $events, $version)
 {
     parent::__construct($laravel, $events, $version);
     #parent::__construct($laravel, new \Illuminate\Events\Dispatcher($laravel), $version);
 }
开发者ID:codex-project,项目名称:develop,代码行数:5,代码来源:CodexArtisan.php


注:本文中的Illuminate\Console\Application::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。