當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Application::start方法代碼示例

本文整理匯總了PHP中Illuminate\Console\Application::start方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::start方法的具體用法?PHP Application::start怎麽用?PHP Application::start使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Console\Application的用法示例。


在下文中一共展示了Application::start方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getArtisan

 /**
  * Get the Artisan console instance.
  *
  * @return Illuminate\Console\Application
  */
 protected function getArtisan()
 {
     if (!is_null($this->artisan)) {
         return $this->artisan;
     }
     return $this->artisan = ConsoleApplication::start($this->app);
 }
開發者ID:defra91,項目名稱:levecchiecredenze.it,代碼行數:12,代碼來源:Artisan.php

示例2: getArtisan

 /**
  * Get the Artisan console instance.
  *
  * @return \Illuminate\Console\Application
  */
 protected function getArtisan()
 {
     if (!is_null($this->artisan)) {
         return $this->artisan;
     }
     $this->app->loadDeferredProviders();
     return $this->artisan = ConsoleApplication::start($this->app);
 }
開發者ID:Thomvh,項目名稱:turbine,代碼行數:13,代碼來源:Artisan.php

示例3: run

 public function run()
 {
     if (!$this->checkUser()) {
         echo '<p>' . Lang::get('web-artisan::webartisan.terminal.needlogin') . '</p>';
         return;
     }
     $parts = explode(" ", Input::get('cmd'));
     if (count($parts) < 2) {
         echo '<p>' . Lang::get('web-artisan::webartisan.terminal.invalidcmd') . '</p>';
         return;
     }
     //first is "artisan" so remove it
     unset($parts[0]);
     //second is the command
     $cmd = $parts[1];
     unset($parts[1]);
     $app = app();
     $app->loadDeferredProviders();
     $artisan = ConsoleApplication::start($app);
     $command = $artisan->find($cmd);
     $def = $command->getDefinition();
     $arguments = $def->getArguments();
     $fix = array();
     foreach ($arguments as $argument) {
         $fix[] = $argument->getName();
     }
     $arguments = $fix;
     $params = array();
     //the rest should be the parameter list
     $i = 0;
     //The counter for our argument list
     foreach ($parts as $param) {
         // foo=bar, we don't need to work more
         if (strpos($param, "=") !== false) {
             $param = explode("=", $param, 2);
             $params[$param[0]] = $param[1];
         } else {
             //Do we have an argument or an option?
             if (substr($param, 0, 1) == "-") {
                 $params[$param] = true;
                 //Option, simply set it to true
             } else {
                 //Argument, we need a bit work
                 $params[$arguments[$i]] = $param;
                 ++$i;
             }
         }
     }
     $params['command'] = $cmd;
     $input = new ArrayInput($params);
     $command->run($input, new Output());
 }
開發者ID:m3dweb,項目名稱:bcnbit,代碼行數:52,代碼來源:Cmd.php

示例4: start

 /**
  * Create and boot a new Console application.
  *
  * @param \Illuminate\Foundation\Application $app
  * @return \Illuminate\Console\Application 
  * @static 
  */
 public static function start($app)
 {
     return \Illuminate\Console\Application::start($app);
 }
開發者ID:nmkr,項目名稱:basic-starter,代碼行數:11,代碼來源:_ide_helper.php


注:本文中的Illuminate\Console\Application::start方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。