Requests 2.0.7 API

HookManager

Event dispatcher

Table of Contents

dispatch()  : bool
Dispatch a message
register()  : mixed
Register a callback for a hook

Methods

dispatch()

Dispatch a message

public dispatch(string $hook[, array<string|int, mixed> $parameters = [] ]) : bool
Parameters
$hook : string

Hook name

$parameters : array<string|int, mixed> = []

Parameters to pass to callbacks

Return values
bool

Successfulness

register()

Register a callback for a hook

public register(string $hook, callable $callback, int $priority) : mixed
Parameters
$hook : string

Hook name

$callback : callable

Function/method to call on event

$priority : int

Priority number. <0 is executed earlier, >0 is executed later

Return values
mixed

Search results