think\Console::getDefinition PHP Method

getDefinition() public method

获取输入参数定义
public getDefinition ( ) : Definition
return think\console\input\Definition The InputDefinition instance
    public function getDefinition()
    {
        return $this->definition;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * 合并参数定义
  * @param bool $mergeArgs
  */
 public function mergeConsoleDefinition($mergeArgs = true)
 {
     if (null === $this->console || true === $this->consoleDefinitionMerged && ($this->consoleDefinitionMergedWithArgs || !$mergeArgs)) {
         return;
     }
     if ($mergeArgs) {
         $currentArguments = $this->definition->getArguments();
         $this->definition->setArguments($this->console->getDefinition()->getArguments());
         $this->definition->addArguments($currentArguments);
     }
     $this->definition->addOptions($this->console->getDefinition()->getOptions());
     $this->consoleDefinitionMerged = true;
     if ($mergeArgs) {
         $this->consoleDefinitionMergedWithArgs = true;
     }
 }
All Usage Examples Of think\Console::getDefinition