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

Class: Action

Source Location: /action/Action.class.php

Class Overview

MojaviObject
   |
   --Action

Action allows you to separate application and business logic from your presentation. By providing a core set of methods used by the framework, automation in the form of security and validation can occur.


Author(s):

  • Sean Kerr (skerr@mojavi.org)

Version:

  • $Id: Action.class.php 665 2004-12-15 04:31:19Z seank $

Copyright:

Methods


Inherited Methods

Class: MojaviObject

MojaviObject::toString()
Retrieve a string representation of this object.

Class Details

[line 25]
Action allows you to separate application and business logic from your presentation. By providing a core set of methods used by the framework, automation in the form of security and validation can occur.



Tags:

abstract:  
version:  $Id: Action.class.php 665 2004-12-15 04:31:19Z seank $
since:  1.0.0
copyright:  (c) Sean Kerr, http://www.mojavi.org
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]


Class Methods


method execute [line 61]

mixed execute( )

Execute any application/business logic for this action.

In a typical database-driven application, execute() handles application logic itself and then proceeds to create a model instance. Once the model instance is initialized it handles all business logic for the action.

A model should represent an entity in your application. This could be a user account, a shopping cart, or even a something as simple as a single product.




Tags:

return:  

A string containing the view name associated with this action.

Or an array with the following indices:

  • The parent module of the view that will be executed.
  • The view that will be executed.

abstract:  
since:  1.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method getContext [line 73]

Context getContext( )

Retrieve the current application context.



Tags:

return:  The current Context instance.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method getCredential [line 90]

mixed getCredential( )

Retrieve the credential required to access this action.



Tags:

return:  Data that indicates the level of security for this action.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method getDefaultView [line 114]

mixed getDefaultView( )

Retrieve the default view to be executed when a given request is not served by this action.



Tags:

return:  

A string containing the view name associated with this action.

Or an array with the following indices:

  • The parent module of the view that will be executed.
  • The view that will be executed.

access:  public
since:  1.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method getRequestMethods [line 137]

int getRequestMethods( )

Retrieve the request methods on which this action will process validation and execution.



Tags:

return:  

One of the following values:

  • Request::GET
  • Request::POST
  • Request::NONE

access:  public
since:  1.0.0
author:  Sean Kerr (skerr@mojavi.org)
see:  Request


[ Top ]

method handleError [line 160]

mixed handleError( )

Execute any post-validation error application logic.



Tags:

return:  

A string containing the view name associated with this action.

Or an array with the following indices:

  • The parent module of the view that will be executed.
  • The view that will be executed.

access:  public
since:  2.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method initialize [line 180]

bool initialize( Context $context)

Initialize this action.



Tags:

return:  true, if initialization completes successfully, otherwise false.
access:  public
since:  2.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

Context   $context   The current application context.

[ Top ]

method isSecure [line 199]

bool isSecure( )

Indicates that this action requires security.



Tags:

return:  true, if this action requires security, otherwise false.
access:  public
since:  1.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method registerValidators [line 218]

void registerValidators( ValidatorManager $validatorManager)

Manually register validators for this action.



Tags:

access:  public
since:  1.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

ValidatorManager   $validatorManager   A ValidatorManager instance.

[ Top ]

method validate [line 233]

bool validate( )

Manually validate files and parameters.



Tags:

return:  true, if validation completes successfully, otherwise false.
access:  public
since:  1.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]


Documentation generated on Tue, 21 Feb 2006 01:45:08 +0900 by phpDocumentor 1.3.0RC5