mojavi
[ class tree: mojavi ] [ index: mojavi ] [ all elements ]

Class: Action

Source Location: /Action.class.php

Class Overview


All Action implementations must extend this class. An Action implementation is used to execute business logic, which should be encapsulated in a model. A model is a class that provides methods to manipulate data that is linked to something, such as a database.


Author(s):

  • Sean Kerr

Methods


Inherited Variables

Inherited Methods


Class Details

[line 28]
All Action implementations must extend this class. An Action implementation is used to execute business logic, which should be encapsulated in a model. A model is a class that provides methods to manipulate data that is linked to something, such as a database.



<note> This class does not need to be included. It is part of the main library. </note>




Tags:

since:  1.0
author:  Sean Kerr


[ Top ]


Class Methods


constructor Action [line 37]

Action &Action( )

Create a new Action instance.



Tags:

since:  1.0
access:  public


[ Top ]

method execute [line 67]

mixed execute( Controller &$controller, Request &$request, User &$user)

Execute all business logic.



<note> This method should never be called manually. </note>




Tags:

return:  

A single string value describing the view or an indexed array coinciding with the following list:

  • 1st index - module name
  • 2nd index - action name
  • 3rd index - view name

since:  1.0
access:  public


Parameters:

Controller   &$controller   A Controller instance.
Request   &$request   A Request instance.
User   &$user   A User instance.

[ Top ]

method getDefaultView [line 91]

mixed getDefaultView( Controller &$controller, Request &$request, User &$user)

Retrieve the default view.



Tags:

return:  <use method="execute"/>
since:  1.0
access:  public


Parameters:

Controller   &$controller   A Controller instance.
Request   &$request   A Request instance.
User   &$user   A User instance.

[ Top ]

method getPrivilege [line 117]

array getPrivilege( Controller &$controller, Request &$request, User &$user)

Retrieve the privilege required to access this action.



Tags:

return:  

An indexed array coinciding with the following list:

  • 1st index - privilege name
  • 2nd index - privilege namespace (optional)

since:  1.0
see:  Action::isSecure()
access:  public


Parameters:

Controller   &$controller   A Controller instance.
Request   &$request   A Request instance.
User   &$user   A User instance.

[ Top ]

method getRequestMethods [line 137]

int getRequestMethods( )

Retrieve the HTTP request method(s) this action will serve.



Tags:

return:  

A request method that is one of the following:

  • REQ_GET - serve GET requests
  • REQ_POST - serve POST requests

since:  1.0
access:  public


[ Top ]

method handleError [line 156]

mixed handleError( Controller &$controller, Request &$request, User &$user)

Handle a validation error.



Tags:

return:  <use method="execute"/>
since:  1.0
access:  public


Parameters:

Controller   &$controller   A Controller instance.
Request   &$request   A Request instance.
User   &$user   A User instance.

[ Top ]

method initialize [line 176]

bool initialize( Controller &$controller, Request &$request, User &$user)

Execute action initialization procedure.



Tags:

return:  TRUE, if this action initializes successfully, otherwise FALSE.
since:  2.0
access:  public


Parameters:

Controller   &$controller   A Controller instance.
Request   &$request   A Request instance.
User   &$user   A User instance.

[ Top ]

method isSecure [line 192]

bool isSecure( )

Determine if this action requires authentication.



Tags:

return:  TRUE, if this action requires authentication, otherwise FALSE.
since:  1.0
access:  public


[ Top ]

method registerValidators [line 216]

void registerValidators( ValidatorManager &$validatorManager, Controller &$controller, Request &$request, User &$user)

Register individual parameter validators.



<note> This method should never be called manually. </note>




Tags:

since:  1.0
access:  public


Parameters:

ValidatorManager   &$validatorManager   A ValidatorManager instance.
Controller   &$controller   A Controller instance.
Request   &$request   A Request instance.
User   &$user   A User instance.

[ Top ]

method validate [line 241]

bool validate( Controller &$controller, Request &$request, User &$user)

Validate the request as a whole.



<note> This method should never be called manually. </note>




Tags:

return:  TRUE, if validation completes successfully, otherwise FALSE.
since:  1.0
access:  public


Parameters:

Controller   &$controller   A Controller instance.
Request   &$request   A Request instance.
User   &$user   A User instance.

[ Top ]


Documentation generated on Wed, 15 Jun 2005 11:43:15 +0900 by phpDocumentor 1.2.3