本文整理汇总了PHP中Illuminate\Contracts\Foundation\Application::version方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::version方法的具体用法?PHP Application::version怎么用?PHP Application::version使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Contracts\Foundation\Application
的用法示例。
在下文中一共展示了Application::version方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getArtisan
/**
* Get the Artisan application instance.
*
* @return \Illuminate\Console\Application
*/
protected function getArtisan()
{
if (is_null($this->artisan)) {
return $this->artisan = (new Artisan($this->app, $this->events, $this->app->version()))->resolveCommands($this->commands);
}
return $this->artisan;
}
示例2: __construct
/**
* Create a new Artisan console application.
*
* @param \Illuminate\Contracts\Foundation\Application $laravel
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void
*/
public function __construct(LaravelApplication $laravel, Dispatcher $events)
{
parent::__construct('Laravel Framework', $laravel->version());
$this->laravel = $laravel;
$this->setAutoExit(false);
$this->setCatchExceptions(false);
$events->fire('artisan.start', [$this]);
}
示例3: writeSettings
protected function writeSettings()
{
$settings = $this->application->make('Flarum\\Settings\\SettingsRepositoryInterface');
$this->info('Writing default settings');
$settings->set('version', $this->application->version());
foreach ($this->settings as $k => $v) {
$settings->set($k, $v);
}
}
示例4: __construct
/**
* Create a new Artisan console application.
*
* @param \Illuminate\Contracts\Foundation\Application $laravel
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return Application
*/
public function __construct(LaravelApplication $laravel, Dispatcher $events)
{
SymfonyApplication::__construct('NewUp', $laravel->version());
$this->event = $events;
$this->laravel = $laravel;
$this->setAutoExit(false);
$this->setCatchExceptions(false);
$events->fire('artisan.start', [$this]);
}
示例5: index
/**
* index.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Recca0120\Terminal\Kernel $kernel
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Contracts\Response\Factory $responseFactory
* @param \Illuminate\Contracts\Routing\UrlGenerator $urlGenerator
* @param string $view
*
* @return mixed
*/
public function index(Application $app, Kernel $kernel, Request $request, ResponseFactory $responseFactory, UrlGenerator $urlGenerator, $view = 'index')
{
$kernel->call('--ansi');
$csrfToken = null;
if ($request->hasSession() === true) {
$csrfToken = $request->session()->token();
}
$options = json_encode(['csrfToken' => $csrfToken, 'username' => 'LARAVEL', 'hostname' => php_uname('n'), 'os' => PHP_OS, 'basePath' => $app->basePath(), 'environment' => $app->environment(), 'version' => $app->version(), 'endpoint' => $urlGenerator->action('\\' . static::class . '@endpoint'), 'helpInfo' => $kernel->output(), 'interpreters' => ['mysql' => 'mysql', 'artisan tinker' => 'tinker', 'tinker' => 'tinker'], 'confirmToProceed' => ['artisan' => ['migrate', 'migrate:install', 'migrate:refresh', 'migrate:reset', 'migrate:rollback', 'db:seed']]]);
$id = $view === 'panel' ? Str::random(30) : null;
return $responseFactory->view('terminal::' . $view, compact('options', 'resources', 'id'));
}