当前位置: 首页>>代码示例>>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;未经允许,请勿转载。