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