if(isset($tags[0]['command'])){ $aliases = $tags[0]['command']; }else{ if(!$r = $container->getReflectionClass($class)){ thrownewInvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); } if(!$r->isSubclassOf(Command::class)){ thrownewInvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, 'console.command', Command::class)); } $aliases = str_replace('%', '%%', $class::getDefaultName() ?? ''); }
/**
* Returns the locale id from the order
*/ privatefunctiongetOrderLocaleId(int $orderId): string { return(string)$this->container->get(Connection::class)
/**
* @param string|null $name The name of the command; passing null means it must be set in configure()
*
* @throws LogicException When the command name is empty
*/ publicfunction__construct(string $name = null) { $this->definition = newInputDefinition();
if(isset($tags[0]['command'])){ $aliases = $tags[0]['command']; }else{ if(!$r = $container->getReflectionClass($class)){ thrownewInvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); } if(!$r->isSubclassOf(Command::class)){ thrownewInvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, 'console.command', Command::class)); } $aliases = str_replace('%', '%%', $class::getDefaultName() ?? ''); }
/**
* @param string|null $name The name of the command; passing null means it must be set in configure()
*
* @throws LogicException When the command name is empty
*/ publicfunction__construct(string $name = null) { $this->definition = newInputDefinition();