Class phpbb_hook

Description

phpBB Hook Class

Located in /includes/hooks/index.php (line 23)


	
			
Variable Summary
 mixed $hooks
 mixed $hook_result
Method Summary
 phpbb_hook phpbb_hook (array $valid_hooks)
 void add_hook (mixed $definition)
 bool call_hook (mixed $definition)
 bool hook_return (mixed $definition)
 mixed hook_return_result (mixed $definition)
 mixed previous_hook_result (mixed $definition)
 void register (mixed $definition, mixed $hook, [string $mode = 'normal'])
 void remove_hook (mixed $definition)
Variables
mixed $current_hook = NULL (line 38)

internal pointer

mixed $hooks = array() (line 28)

Registered hooks

mixed $hook_result = array() (line 33)

Results returned by functions called

Methods
Constructor phpbb_hook (line 45)

Initialize hook class.

phpbb_hook phpbb_hook (array $valid_hooks)
  • array $valid_hooks: array containing the hookable functions/methods
add_hook (line 218)

Add new function to the allowed hooks.

void add_hook (mixed $definition)
  • mixed $definition: Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
call_hook (line 107)

Calling all functions/methods attached to a specified hook.

Called by the function allowing hooks...

  • return: False if no hook got executed, true otherwise
bool call_hook (mixed $definition)
  • mixed $definition: Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
hook_return (line 179)

Check if the called functions/methods returned something.

  • return: True if results are there, false if not
bool hook_return (mixed $definition)
  • mixed $definition: Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
hook_return_result (line 198)

Give actual result from called functions/methods back.

  • return: The result
mixed hook_return_result (mixed $definition)
  • mixed $definition: Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
previous_hook_result (line 160)

Get result from previously called functions/methods for the same hook

  • return: False if nothing returned if there is no result, else array('result' => ... )
mixed previous_hook_result (mixed $definition)
  • mixed $definition: Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
register (line 66)

Register function/method to be called within hook This function is normally called by the modification/application to attach/register the functions.

void register (mixed $definition, mixed $hook, [string $mode = 'normal'])
  • mixed $definition: Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
  • mixed $hook: The replacement function/method to be called. Passing function name or array with object/class definition
  • string $mode: Specify the priority/chain mode. 'normal' -> hook gets appended to the chain. 'standalone' -> only the specified hook gets called - later hooks are not able to overwrite this (E_NOTICE is triggered then). 'first' -> hook is called as the first one within the chain. 'last' -> hook is called as the last one within the chain.
remove_hook (line 233)

Remove function from the allowed hooks.

void remove_hook (mixed $definition)
  • mixed $definition: Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)

Documentation generated on Tue, 26 Aug 2008 08:34:05 +0200 by phpDocumentor 1.4.2