SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Event

Process queuing/execution class. Allows an unlimited number of callbacks
to be added to 'events'. Events can be run multiple times, and can also
process event-specific data. By default, Kohana has several system events.

$Id: Event.php 4390 2009-06-04 03:05:36Z zombor $

Authors

Variables

NameVisibilityDescription
$data (static) 
$events (static) 
$has_run (static) 

Functions

NameVisibilityDescription
addpublic (static)Add a callback to an event queue.
addAfterpublic (static)Add a callback to an event queue, after a given event.
addBeforepublic (static)Add a callback to an event queue, before a given event.
clearpublic (static)Clear some or all callbacks from an event.
getpublic (static)Get all callbacks for an event.
hasRunpublic (static)Check if a given event has been run.
insertEventprivate (static)Inserts a new event at a specfic key location.
replacepublic (static)Replaces an event with another event.
runpublic (static)Execute all of the callbacks attached to an event.

public add

boolean Event::add ( string $name , array $callback );

Add a callback to an event queue.

public addAfter

boolean Event::addAfter ( string $name , array $existing , array $callback );

Add a callback to an event queue, after a given event.

public addBefore

boolean Event::addBefore ( string $name , array $existing , array $callback );

Add a callback to an event queue, before a given event.

public clear

void Event::clear ( string $name [, array $callback ] );

Clear some or all callbacks from an event.

public get

array Event::get ( string $name );

Get all callbacks for an event.

public hasRun

boolean Event::hasRun ( string $name );

Check if a given event has been run.

private insertEvent

void Event::insertEvent ( string $name , integer $key , array $callback );

Inserts a new event at a specfic key location.

public replace

boolean Event::replace ( string $name , array $existing , array $callback );

Replaces an event with another event.

public run

void Event::run ( string $name [, array &$data ] );

Execute all of the callbacks attached to an event.