Exemplo n.º 1
0
 /**
  * Override Illuminate\Console\Command to dynamic inject the user-specified --set-* options in the configuration.
  *
  * @return void
  */
 protected function specifyParameters()
 {
     // Identify our options
     foreach ($_SERVER['argv'] as $argument) {
         if (!Str::startsWith($argument, '--' . self::TAG_PREFIX)) {
             continue;
         }
         // Strip past the '='
         $argument = substr($argument, 0, strpos($argument, '='));
         // Add as option, if prefix matches
         $this->tags[] = substr($argument, strlen(self::TAG_PREFIX));
         $this->options[] = [$argument, null, InputOption::VALUE_REQUIRED];
     }
     return parent::specifyParameters();
 }