[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/includes/hooks/ -> index.php (summary)

(no description)

Copyright: (c) 2007 phpBB Group
License: http://opensource.org/licenses/gpl-license.php GNU Public License
Version: $Id$
File Size: 250 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

phpbb_hook:: (8 methods):
  phpbb_hook()
  register()
  call_hook()
  previous_hook_result()
  hook_return()
  hook_return_result()
  add_hook()
  remove_hook()


Class: phpbb_hook  - X-Ref

phpBB Hook Class

phpbb_hook($valid_hooks)   X-Ref
Initialize hook class.

param: array $valid_hooks array containing the hookable functions/methods

register($definition, $hook, $mode = 'normal')   X-Ref
Register function/method to be called within hook
This function is normally called by the modification/application to attach/register the functions.

param: mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
param: mixed $hook The replacement function/method to be called. Passing function name or array with object/class definition
param: 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.

call_hook($definition)   X-Ref
Calling all functions/methods attached to a specified hook.
Called by the function allowing hooks...

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

previous_hook_result($definition)   X-Ref
Get result from previously called functions/methods for the same hook

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

hook_return($definition)   X-Ref
Check if the called functions/methods returned something.

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

hook_return_result($definition)   X-Ref
Give actual result from called functions/methods back.

param: mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
return: mixed The result

add_hook($definition)   X-Ref
Add new function to the allowed hooks.

param: mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)

remove_hook($definition)   X-Ref
Remove function from the allowed hooks.

param: mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)



Generated: Wed Oct 2 15:03:47 2013 Cross-referenced by PHPXref 0.7.1