X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=application%2Fship-simu%2Fmain%2Fcommands%2Fweb%2Fclass_WebShipsimuRegisterCommand.php;h=035991df0644fb10211f46eb68c8bf4ed83f45c5;hb=395b0b1f81b13a11c7a9258c3b5e01dceee6a4e2;hp=4fbfdcc5bd8b8100f1c418952168dc4e2dcf5038;hpb=36dfbfe39c864c7a426573df03c8ab59ff968737;p=shipsimu.git diff --git a/application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php b/application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php index 4fbfdcc..035991d 100644 --- a/application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php +++ b/application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php @@ -35,7 +35,7 @@ class WebShipsimuRegisterCommand extends BaseCommand implements Commandable { $this->setObjectDescription("Registration handling command for Ship-Simu"); // Create unique ID number - $this->createUniqueID(); + $this->generateUniqueId(); // Clean up a little $this->removeNumberFormaters(); @@ -58,11 +58,12 @@ class WebShipsimuRegisterCommand extends BaseCommand implements Commandable { // Get the controller instance from the resolver (breaks MVC pattern again) $controllerInstance = $resolverInstance->getControllerInstance(); - // @TODO Add some more pre/post filters to the controller - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_validator')); - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_validator')); - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_validator')); - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('rules_accepted_filter')); + /* @TODO Add some more pre/post filters to the controller */ + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_validator_class')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_validator_class')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_is_guest_class')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_validator_class')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('rules_accepted_class')); // Return the prepared instance return $commandInstance; @@ -77,7 +78,7 @@ class WebShipsimuRegisterCommand extends BaseCommand implements Commandable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // First get a UserRegistration instance - $registerInstance = ObjectFactory::createObjectByConfiguredName('user_registration'); + $registerInstance = ObjectFactory::createObjectByConfiguredName('user_registration_class'); // First set request and response instance $registerInstance->setRequestInstance($requestInstance);