This is the class expHistory Exponent History Subsystem
The expHistory class is responsible for keeping track of which pages a user has visited while on the site. It also tracks what type of page/view each one is, viewable, manageable, editable and uses this information to intelligently route the user to proper places. A developer can also use the methods of this class help Exponent know where to route users.
DEFINITIONS
USAGE EXAMPLES:
Example: How to set a history WayPoint
This example shows how you would use expHistory to set a waypoint inside one of your actions
public function showall() {
expHistory::set('viewable', $this->params);
$record = new foo($id);
assign_to_template(array('record'=>$record));
}
Example: Return to a waypoint (automagically)
This example shows how to let expHistory::back() automagically determine where to route the user after an action completes
public function delete() {
$record = new foo($id);
$record->delete();
expHistory::back();
}
Example: Return to a waypoint 'type' (manually) This example shows how use expHistory::returnTo() to manually route the user after an action completes. In this example the user will be routed to the last form he/she was on.
public function delete() {
$record = new foo($id);
$record->delete();
expHistory::returnTo('editable');
}
package |
Subsystems |
---|---|
subpackage |
Subsystems |
__construct()
The constructor will grab the users history from the session. If it is not present in the session it will be initialized and saved later.
back()
flush()
getBack( $depth) : mixed
static |
---|
int How deep/far back in history to pull a link
mixed
getLast( $url_type = null)
getLastNotEditable()
goHere( $url_type = null, $params = array())
lastNotEditable()
lastUrl( $url_type = null)
print_history()
redirecto_login(null $redirecturl = null)
null
returnTo( $url_type = null, $params = array())
set( $url_type, $params)
setHistory( $url_type, $params)
history : array
access |
public |
---|---|
var |
array