Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Elgg\ActionsService Class Reference

Public Member Functions

 execute ($action, $forwarder="")
 
 register ($action, $filename="", $access= 'logged_in')
 
 unregister ($action)
 
 validateActionToken ($visible_errors=true, $token=null, $ts=null)
 
 getActionTokenTimeout ()
 
 gatekeeper ($action)
 
 validateTokenOwnership ($token, $timestamp, $session_token= '')
 Was the given token generated for the session defined by session_token? More...
 
 generateActionToken ($timestamp, $session_token= '')
 Generate a token from a session token (specifying the user), the timestamp, and the site key. More...
 
 exists ($action)
 
 ajaxForwardHook ($hook, $reason, $return, $params)
 
 ajaxActionHook ()
 
 getAllActions ()
 Get all actions. More...
 

Protected Member Functions

 validateTokenTimestamp ($ts)
 Is the token timestamp within acceptable range? More...
 

Static Protected Member Functions

static includeFile ($file)
 Include an action file with isolated scope. More...
 

Detailed Description

Definition at line 16 of file ActionsService.php.

Member Function Documentation

Elgg\ActionsService::ajaxActionHook ( )
See Also
ajax_action_hook private

Definition at line 432 of file ActionsService.php.

Elgg\ActionsService::ajaxForwardHook (   $hook,
  $reason,
  $return,
  $params 
)
See Also
ajax_forward_hook private

Definition at line 350 of file ActionsService.php.

Elgg\ActionsService::execute (   $action,
  $forwarder = "" 
)
See Also
action private

Complete the execution with a forward

Parameters
string$error_keyError message key
Exceptions
\SecurityException

Definition at line 44 of file ActionsService.php.

Elgg\ActionsService::exists (   $action)
See Also
elgg_action_exists private

Definition at line 342 of file ActionsService.php.

Elgg\ActionsService::gatekeeper (   $action)
See Also
action_gatekeeper private

Definition at line 273 of file ActionsService.php.

Elgg\ActionsService::generateActionToken (   $timestamp,
  $session_token = '' 
)

Generate a token from a session token (specifying the user), the timestamp, and the site key.

See Also
generate_action_token
Parameters
int$timestampUnix timestamp
string$session_tokenSession-specific token
Returns
string private

Definition at line 326 of file ActionsService.php.

Elgg\ActionsService::getActionTokenTimeout ( )
See Also
::validateActionToken private
Since
1.9.0
Returns
int number of seconds that action token is valid

Definition at line 260 of file ActionsService.php.

Elgg\ActionsService::getAllActions ( )

Get all actions.

Returns
array

Definition at line 443 of file ActionsService.php.

static Elgg\ActionsService::includeFile (   $file)
staticprotected

Include an action file with isolated scope.

Parameters
string$fileFile to be interpreted by PHP
Returns
void

Definition at line 131 of file ActionsService.php.

Elgg\ActionsService::register (   $action,
  $filename = "",
  $access = 'logged_in' 
)
See Also
elgg_register_action private

Definition at line 139 of file ActionsService.php.

Elgg\ActionsService::unregister (   $action)
See Also
elgg_unregister_action private

Definition at line 165 of file ActionsService.php.

Elgg\ActionsService::validateActionToken (   $visible_errors = true,
  $token = null,
  $ts = null 
)
See Also
validate_action_token private

Definition at line 178 of file ActionsService.php.

Elgg\ActionsService::validateTokenOwnership (   $token,
  $timestamp,
  $session_token = '' 
)

Was the given token generated for the session defined by session_token?

Parameters
string$tokenCSRF token
int$timestampUnix time
string$session_tokenSession-specific token
Returns
bool private

Definition at line 309 of file ActionsService.php.

Elgg\ActionsService::validateTokenTimestamp (   $ts)
protected

Is the token timestamp within acceptable range?

Parameters
int$tstimestamp from the CSRF token
Returns
bool

Definition at line 248 of file ActionsService.php.


The documentation for this class was generated from the following file: