Class myMVC_BasePage

Description

Generic page class. myMVC_BaseAction and myMVC_BaseView are derived from this class.

Located in /myMVC/BasePage.php (line 27)


	
			
Direct descendents
Class Description
Abstract class myMVC_BaseView Base class for the Views.
Abstract class myMVC_BaseAction Base class for all actions.
Method Summary
 myMVC_BasePage __construct ()
 void getFromPreviousSubmit ( $field)
 void getParameterFromPreviousPage (string $key)
 bool isParameterFromPreviousSubmitValid (string $field)
 void saveParameterForNextPage (string $key, string $value)
Methods
static getLoggedUser (line 48)

Returns the current logged user, if any.

This function has to be static, then it will normally called from static functions (eg hasUserRightForAction).

  • return: The currently logged user, or NULL if no user is logged in, or the user's class is not a subclass of myMVC_BaseLogin
  • access: protected
myMVC_BaseLogin getLoggedUser ()
Constructor __construct (line 35)

Constructor.

This function does nothing! This class will not be used, but just derived (see myMVC_BaseAction and myMVC_BaseView)

  • access: public
myMVC_BasePage __construct ()

Redefined in descendants as:
getFromPreviousSubmit (line 88)

Returns the value for the given field in the previous submitted form.

WARNING: This function just returns the fields, that passed the validation!!

  • access: protected
void getFromPreviousSubmit ( $field)
  • $field
getInvalidFromPreviousSubmit (line 106)

Returns the value for the given field in the previous submitted form.

WARNING: This function just returns the fields, that NOT passed the validation!!

  • access: protected
void getInvalidFromPreviousSubmit ( $field)
  • $field
getParameterErrors (line 139)

Returns all error messages after the validation of the user's parameters

  • return: An associative array with all the errors in the format 'field' => 'error message'
  • access: protected
array getParameterErrors ()
getParameterFromPreviousPage (line 77)

Returns a variable saved from the previous class with saveParameterForNextPage

  • access: protected
void getParameterFromPreviousPage (string $key)
  • string $key: The name of the variable
isParameterFromPreviousSubmitValid (line 120)

Returns whether the given parameter of the previous submitted form passed the validation or not.

  • return: true if the parameter passed the validation, false otherwise
  • access: protected
bool isParameterFromPreviousSubmitValid (string $field)
  • string $field: The name of the parameter
saveParameterForNextPage (line 65)

Save a variable in the session, to be used by the next page (Action or view).

This variable can be read with the method getParameterFromPreviousPage of the classes BaseAction or BaseView

  • access: protected
void saveParameterForNextPage (string $key, string $value)
  • string $key: The name of the variable
  • string $value: The value

Documentation generated on Sat, 20 Oct 2012 18:18:48 +0200 by phpDocumentor 1.4.4