本文整理汇总了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');
}
示例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());
}
示例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'));
}
示例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();
}
示例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);
}
示例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();
}
示例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;
}
示例8: __construct
public function __construct(Container $laravel, Dispatcher $events, $version)
{
parent::__construct($laravel, $events, $version);
$this->setName(app()->getName());
}
示例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');
}
示例10: __construct
public function __construct(Container $laravel, Dispatcher $events, $version, SymfonyApplication $application)
{
$this->application = $application;
parent::__construct($laravel, $events, $version);
}
示例11: __construct
public function __construct(Container $laravel, Dispatcher $events, $version)
{
parent::__construct($laravel, $events, $version);
#parent::__construct($laravel, new \Illuminate\Events\Dispatcher($laravel), $version);
}