ShipSimuGovernmentPaysTrainingFilter.execute ( Requestable requestInstance,
Responseable responseInstance 
)

Executes the filter with given request and response objects.

Parameters:
$requestInstance An instance of a class with an Requestable interface
$responseInstance An instance of a class with an Responseable interface
Returns:
void
Todo:
0% done

Reimplemented from BaseShipSimuFilter.

Definition at line 56 of file class_ShipSimuGovernmentPaysTrainingFilter.php.

References BaseFrameworkSystem.$userInstance, Registry.getRegistry(), Responseable.redirectToConfiguredUrl(), and Requestable.requestIsValid().

00056                                                                                                {
00057                 // Execute the parent execute method
00058                 parent::execute($requestInstance, $responseInstance);
00059 
00060                 // Get the user instance from registry
00061                 $userInstance = Registry::getRegistry()->getInstance('user');
00062 
00063                 // Now simply check for it
00064                 if ((!$userInstance instanceof ManageableMember) || ($userInstance->ifGovernmentPaysTraining() === false)) {
00065                         // Request is invalid
00066                         $requestInstance->requestIsValid(false);
00067 
00068                         // Redirect to configured URL
00069                         $responseInstance->redirectToConfiguredUrl('login_government_training_failed_url');
00070 
00071                         // Stop processing here
00072                         exit();
00073                 } // END - if
00074         }

Here is the call graph for this function:


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