Unrelated (and invisible) to this PR:
I'd much rather prefer having a service that acts as a registry, which generates the naming strategies for various domain languages, so that it could be easily extended.
E.g. this code:
$actionName = new UnicodeString($input->getOption("command-action"));
$actionName = $actionName->camel()->title()->toString();
if ("en" === $this->getDomainLanguage($domain)) {
$commandNamespace = $actionName . $entity;
}
else {
$commandNamespace = $entity . $actionName;
}
would become this:
$actionName = new UnicodeString($input->getOption("command-action"));
$namingStrategy = $this->domainNamingStrategyRegistry->getForDomain($domain);
$commandNamespace = $namingStategy->generateCommandNamespace(new DomaindNamingStategyInput($domain, $actionName, $entity));
Originally posted by @keichinger in #6 (comment)
Unrelated (and invisible) to this PR:
I'd much rather prefer having a service that acts as a registry, which generates the naming strategies for various domain languages, so that it could be easily extended.
E.g. this code:
would become this:
Originally posted by @keichinger in #6 (comment)