/** * Constructor performs initializations actions */ public function __construct() { //initialize user service $this->passwordRecoveryService = PasswordRecoveryService::singleton(); $this->userService = \tao_models_classes_UserService::singleton(); $this->defaultData(); }
/** * * @param MessagingService $messagingService * @return PasswordRecoveryService */ protected function getPasswordRecoveryService($messagingService) { $passwordRecoveryService = PasswordRecoveryService::singleton(); $refObject = new ReflectionObject($passwordRecoveryService); $refProperty = $refObject->getProperty('messagingSerivce'); $refProperty->setAccessible(true); $refProperty->setValue($passwordRecoveryService, $messagingService); return $passwordRecoveryService; }