protected function inflectSegment($command, $segment)
{
$className = get_class($command);
if (isset($this->mappings[$className])) {
return $this->getMappingSegment($className, $segment);
} elseif ($this->mapper) {
return $this->getMapperSegment($command, $segment);
}
throw new InvalidArgumentException("No handler registered for command [{$className}]");
}