[pLog-svn] r1664 - plog/trunk/class/action
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Thu Mar 31 14:08:03 GMT 2005
Author: oscar
Date: 2005-03-31 14:08:02 +0000 (Thu, 31 Mar 2005)
New Revision: 1664
Modified:
plog/trunk/class/action/action.class.php
Log:
started to write the documentation of the last module, the "action" module.
Modified: plog/trunk/class/action/action.class.php
===================================================================
--- plog/trunk/class/action/action.class.php 2005-03-31 07:38:12 UTC (rev 1663)
+++ plog/trunk/class/action/action.class.php 2005-03-31 14:08:02 UTC (rev 1664)
@@ -1,9 +1,25 @@
<?php
- /**
- * @package action
- */
+ /**
+ * \defgroup Action
+ *
+ * Action in pLog are the classes that implement the application logic. Action classes are always
+ * instantiated and executed by the Controller after a parameter in an incoming request
+ * matched an action class as specified in the action class map.
+ *
+ * The most basic action class is Action, though API users will generally not need to create objects
+ * of that class directly. Users wishing to extend the features of pLog via plugins will likely
+ * use BlogAction for actions in the public interface, and AdminAction, SiteAdminAction or
+ * BlogOwnerAdminAction depending on which user privileges are required to use the given action.
+ *
+ * @see Action
+ * @see Controller
+ * @see ActionInfo
+ * @see BlogAction
+ * @see SiteAdminAction
+ * @see BlogOwnerAdminAction
+ */
include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
include_once( PLOG_CLASS_PATH."class/action/actioninfo.class.php" );
@@ -13,7 +29,25 @@
include_once( PLOG_CLASS_PATH."class/data/forms/formvalidator.class.php" );
/**
- * Abstract class representing an Action.
+ * \ingroup Action
+ *
+ * The base most basic action class is Action, which provides some common code and the Action::perform()
+ * method which should be implemented by child classes wishing to provide some business logic. At the end
+ * of the method, an Action class is expected to generate a valid View object (or a child class of View)
+ * that will be used by the Controller to render some contents to be sent to the client.
+ *
+ * Action classes are expected to at least provide their own logic in the Action::perform() method. In previous
+ * versions of pLog it was also necessary to provide data validation logic in the Action::validate()
+ * method, but that is not necessary anymore (albeit possible if needed) since the introduction of the
+ * new data validation framework (See the FormValidator class and the Validator and Validator_Rules modules)
+ * The Action::validate() method now provides some code of its own that triggers the data validation process
+ * if there is any data to be validated.
+ *
+ * There is a lot more information about the data validation framework here: http://wiki.plogworld.net/index.php/PLog_1.0/Forms_and_data_validation
+ *
+ * The View object that Action classes must create can be set via the private attribute
+ * Action::_view or te method Action::setView(), though the first one is the most widely used
+ * throughout the core code.
*/
class Action extends Object
{
More information about the pLog-svn
mailing list