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


PHP Application::setRequestForConsoleEnvironment方法代码示例

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


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

示例1: refreshApplication

 /**
  * Refresh the application instance.
  *
  * @return void
  */
 protected function refreshApplication()
 {
     $this->app = $this->createApplication();
     $this->client = $this->createClient();
     $this->app->setRequestForConsoleEnvironment();
     $this->app->boot();
 }
开发者ID:astronautyan,项目名称:O2OMobile_PHP,代码行数:12,代码来源:TestCase.php

示例2: _before

 public function _before(\Codeception\TestCase $test)
 {
     $this->kernel = $this->getApplication();
     $this->kernel->boot();
     $this->kernel->setRequestForConsoleEnvironment();
     $this->client = new LaravelConnector($this->kernel);
     $this->client->followRedirects(true);
     if ($this->config['filters']) {
         $this->haveEnabledFilters();
     }
     if ($this->transactionCleanup()) {
         $this->kernel['db']->beginTransaction();
     }
 }
开发者ID:Eli-TW,项目名称:Codeception,代码行数:14,代码来源:Laravel4.php

示例3: refreshApplication

 /**
  * Refresh the application instance.
  *
  * @param \Illuminate\Foundation\Application $app Optionally provide your own unbooted
  *                                                Laravel Application instance. This
  *                                                parameter can largely be ignored and
  *                                                is used just for unit testing
  * @return void
  */
 public function refreshApplication($app = null)
 {
     $this->app = $app instanceof Application ? $app : $this->createApplication();
     $this->app->setRequestForConsoleEnvironment();
     $this->app->boot();
     if ($this->migrateDatabase) {
         $artisan = $this->app->make('artisan');
         try {
             $artisan->call('migrate:install');
         } catch (QueryException $e) {
             // migration table is already installed
         }
         $artisan->call('migrate:refresh');
         if ($this->seedDatabase) {
             $artisan->call('db:seed', array('--class' => $this->seedClass));
         }
     }
 }
开发者ID:visualturk,项目名称:phpspec-laravel,代码行数:27,代码来源:Laravel.php

示例4: setRequestForConsoleEnvironment

 /**
  * Set the application request for the console environment.
  *
  * @return void 
  * @static 
  */
 public static function setRequestForConsoleEnvironment()
 {
     \Illuminate\Foundation\Application::setRequestForConsoleEnvironment();
 }
开发者ID:nmkr,项目名称:basic-starter,代码行数:10,代码来源:_ide_helper.php


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