static ShipSimuMember.createMemberByRequest ( Requestable requestInstance  )  [static, final]

Creates a user by a given request instance.

Parameters:
$requestInstance An instance of a Requestable class
Returns:
$userInstance An instance of this user class
Todo:
Add more ways of creating user instances

Definition at line 100 of file class_ShipSimuMember.php.

References BaseFrameworkSystem.$userInstance.

00100                                                                                           {
00101                 // Determine if by email or username
00102                 if (!is_null($requestInstance->getRequestElement('username'))) {
00103                         // Username supplied
00104                         $userInstance = self::createMemberByUserName($requestInstance->getRequestElement('username'));
00105                 } elseif (!is_null($requestInstance->getRequestElement('email'))) {
00106                         // Email supplied
00107                         $userInstance = self::createMemberByEmail($requestInstance->getRequestElement('email'));
00108                 } else {
00109                         // Unsupported mode
00110                         $userInstance = new ShipSimuMember();
00111                         $userInstance->partialStub("We need to add more ways of creating user classes here.");
00112                         $userInstance->debugBackTrace();
00113                         exit();
00114                 }
00115 
00116                 // Return the prepared instance
00117                 return $userInstance;
00118         }


Generated on Mon Dec 8 01:18:26 2008 for Ship-Simulator by  doxygen 1.5.6