Legend of the Green Dragon

hook.php

An event that should be triggered.

Table of Contents

modulehook()  : mixed
module_wipehooks()  : mixed
Delete hooks of module.
module_addeventhook()  : mixed
module_drophook()  : void
module_addhook()  : mixed
Called by modules to register themselves for a game module hook point, with default priority.
module_addhook_priority()  : mixed
Called by modules to register themselves for a game module hook point, with a given priority -- lower numbers execute first.

Functions

modulehook()

modulehook(mixed $hookname[, mixed $args = false ][, mixed $allowinactive = false ][, mixed $only = false ]) : mixed
Parameters
$hookname : mixed
$args : mixed = false
$allowinactive : mixed = false
$only : mixed = false
Tags
deprecated
4.4.0

Remove in future version.

Return values
mixed

module_wipehooks()

Delete hooks of module.

module_wipehooks(string $module) : mixed
Parameters
$module : string
Tags
deprecated
4.4.0

Remove in future version.

Return values
mixed

module_addeventhook()

module_addeventhook(mixed $type, mixed $chance) : mixed
Parameters
$type : mixed
$chance : mixed
Return values
mixed

module_drophook()

module_drophook(mixed $hookname[, bool $functioncall = false ]) : void
Parameters
$hookname : mixed
$functioncall : bool = false
Tags
deprecated
4.4.0

Remove in future version

Return values
void

module_addhook()

Called by modules to register themselves for a game module hook point, with default priority.

module_addhook(string $hookname[, string $functioncall = false ][, string $whenactive = false ]) : mixed

Modules with identical priorities will execute alphabetically. Modules can only have one hook on a given hook name, even if they call this function multiple times, unless they specify different values for the functioncall argument.

Parameters
$hookname : string

The hook to receive a notification for

$functioncall : string = false

The function that should be called, if not specified, use {modulename}_dohook() as the function

$whenactive : string = false

an expression that should be evaluated before triggering the event, if not specified, none

Tags
deprecated
4.4.0

Remove in future version

Return values
mixed

module_addhook_priority()

Called by modules to register themselves for a game module hook point, with a given priority -- lower numbers execute first.

module_addhook_priority(string $hookname[, int $priority = 50 ][, string $functioncall = false ][, string $whenactive = false ]) : mixed

Modules with identical priorities will execute alphabetically. Modules can only have one hook on a given hook name, even if they call this function multiple times, unless they specify different values for the functioncall argument.

Parameters
$hookname : string

The hook to receive a notification for

$priority : int = 50

The priority for this hooking -- lower numbers execute first. < 50 means earlier-than-normal execution, > 50 means later than normal execution. Priority only affects execution order compared to other events registered on the same hook, all events on a given hook will execute before the game resumes execution.

$functioncall : string = false

The function that should be called, if not specified, use {modulename}_dohook() as the function

$whenactive : string = false

an expression that should be evaluated before triggering the event, if not specified, none

Tags
deprecated
4.4.0

Remove in future version

Return values
mixed

Search results