| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
class CRM_Core_StateMachine {
/**
- * The controller of this state machine
+ * The controller of this state machine.
* @var object
*/
protected $_controller;
/**
- * The list of states that belong to this state machine
+ * The list of states that belong to this state machine.
* @var array
*/
protected $_states;
protected $_pages;
/**
- * The names of the pages
+ * The names of the pages.
*
* @var array
*/
protected $_pageNames;
/**
- * The mode that the state machine is operating in
+ * The mode that the state machine is operating in.
* @var int
*/
protected $_action = NULL;
/**
- * The display name for this machine
+ * The display name for this machine.
* @var string
*/
protected $_name = NULL;
/**
- * Class constructor
+ * Class constructor.
*
* @param object $controller
* The controller for this state machine.
}
/**
- * Getter for name
+ * Getter for name.
*
* @return string
*/
}
/**
- * Setter for name
+ * Setter for name.
*
- * @param string
+ * @param string $name
*
* @return void
*/
}
/**
- * Do a state transition jump. Currently only supported types are
+ * Do a state transition jump.
+ *
+ * Currently only supported types are
* Next and Back. The other actions (Cancel, Done, Submit etc) do
* not need the state machine to figure out where to go
*
}
/**
- * Helper function to add a State to the state machine
+ * Helper function to add a State to the state machine.
*
* @param string $name
* The internal name.
}
/**
- * Given a name find the corresponding state
+ * Given a name find the corresponding state.
*
* @param string $name
* The state name.
}
/**
- * Return the list of state objects
+ * Return the list of state objects.
*
* @return array
* array of states in the state machine
}
/**
- * Return the state object corresponding to the name
+ * Return the state object corresponding to the name.
*
* @param string $name
* Name of page.
}
/**
- * Return the list of form objects
+ * Return the list of form objects.
*
* @return array
* array of pages in the state machine
}
/**
- * AddSequentialStates: meta level function to create a simple
- * wizard for a state machine that is completely sequential.
+ * Add sequential pages.
*
+ * Meta level function to create a simple wizard for a state machine that is completely sequential.
*
* @param array $pages
* (reference ) the array of page objects.
- *
- * @internal param array $states states is an array of arrays. Each element
- * of the top level array describes a state. Each state description
- * includes the name, the display name and the class name
- *
- * @return void
*/
public function addSequentialPages(&$pages) {
$this->_pages = &$pages;
}
/**
- * Reset the state machine
+ * Reset the state machine.
*
* @return void
*/
}
/**
- * Getter for action
+ * Getter for action.
*
* @return int
*/
}
/**
- * Setter for content
+ * Setter for content.
*
* @param string $content
* The content generated by this state machine.
}
/**
- * Getter for content
+ * Getter for content.
*
* @return string
*/
* beginning from the final state, but retain the same session
* values
*
- * @return boolean
+ * @return bool
*/
public function shouldReset() {
return TRUE;