當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。