Bravo3\Orm\Drivers\Common\Command::getName PHP Method

getName() public method

Get command name
public getName ( ) : string
return string
    public function getName()
    {
        return $this->name;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Have the appropriate worker execute a command
  *
  * @param Command $command
  * @return mixed
  */
 public function execute(Command $command)
 {
     $worker = $this->getWorker($command->getName());
     $args = $command->getArguments();
     foreach ($worker->getRequiredParameters() as $param) {
         if (!array_key_exists($param, $args)) {
             throw new InvalidArgumentException("Command '" . $command->getName() . "' requires parameter '" . $param . "''");
         }
     }
     return $worker->execute($args);
 }
All Usage Examples Of Bravo3\Orm\Drivers\Common\Command::getName