/** * {@inheritdoc} */ public function factory($name, array $args = array()) { if ($this->description->hasCommand($name)) { $command = $this->description->getCommand($name); $class = $command->getConcreteClass(); return new $class($args, $command); } }
/** * {@inheritdoc} */ public function factory($name, array $args = array()) { $command = $this->description->getCommand($name); // If an inflector was passed, then attempt to get the command using // snake_case inflection if (!$command && $this->inflector) { $command = $this->description->getCommand($this->inflector->snake($name)); } if ($command) { $class = $command->getConcreteClass(); return new $class($args, $command); } }