X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Flogin%2Fhelper%2Fclass_ShipSimuLoginHelper.php;h=0e9aee1fedb768cc73a6d420f951875a2ca4e2c5;hp=169f18fbdd5242973893e947282bd412eef26170;hb=9327c11e14407cce78208de01b5cdd2de87e13a3;hpb=b848cab53db89342f0a854a00be91cadbcff2967 diff --git a/application/ship-simu/main/login/helper/class_ShipSimuLoginHelper.php b/application/ship-simu/main/login/helper/class_ShipSimuLoginHelper.php index 169f18f..0e9aee1 100644 --- a/application/ship-simu/main/login/helper/class_ShipSimuLoginHelper.php +++ b/application/ship-simu/main/login/helper/class_ShipSimuLoginHelper.php @@ -35,11 +35,6 @@ class ShipSimuLoginHelper extends BaseLoginHelper implements HelpableLogin { */ private $authMethod = ""; - /** - * Instance for a request class - */ - private $requestInstance = null; - // Exception constants const EXCEPTION_INVALID_USER_INSTANCE = 0x080; @@ -99,26 +94,6 @@ class ShipSimuLoginHelper extends BaseLoginHelper implements HelpableLogin { $this->authMethod = $this->getConfigInstance()->readConfig('auth_method_class'); } - /** - * Setter for request instance - * - * @param $requestInstance A Requestable class instance - * @return void - */ - public final function setRequestInstance (Requestable $requestInstance) { - $this->requestInstance = $requestInstance; - } - - /** - * Getter for request instance - * - * @param - * @return $requestInstance A Requestable class instance - */ - public final function getRequestInstance () { - return $this->requestInstance; - } - /** * Execute the login request by given response instance. This instance can * be used for sending cookies or at least the session id out. @@ -131,10 +106,10 @@ class ShipSimuLoginHelper extends BaseLoginHelper implements HelpableLogin { $loginInstance = ObjectFactory::createObjectByName($this->authMethod, array($responseInstance)); // Set user cookie - $loginInstance->setUserAuth($this->requestInstance->getRequestElement('username')); + $loginInstance->setUserAuth($this->getRequestInstance()->getRequestElement('username')); // Set password cookie - $loginInstance->setPasswordAuth($this->requestInstance->getRequestElement('pass_hash')); + $loginInstance->setPasswordAuth($this->getRequestInstance()->getRequestElement('pass_hash')); // Remember this login instance for later usage Registry::getRegistry()->addInstance('login', $loginInstance);