API > eden > event.php
View Source

class Eden_Event

Allows the ability to listen to events made known by another piece of functionality. Events are items that transpire based on an action. With events you can add extra functionality right after the event has triggered.

Public Methods

public function listen($event, $instance, $method = NULL, $important = false)

Attaches an instance to be notified when an event has been triggered

Arguments

  1. *string
  2. *string|object|callable
  3. string|null|bool
  4. bool

Returns this

public function trigger($event = NULL)

Notify all observers of that a specific event has happened

Arguments

  1. string
  2. [mixed]

Returns this

public function unlisten($event, $instance = NULL, $method = NULL)

Stops listening to an event

Arguments

  1. string|null
  2. object|null
  3. string|null

Returns this

class Eden_Event_Error

Event Errors

Constants

  • NO_METHOD: Instance %s was passed but, no callable method was passed in listen().

© 2012 Openovate Labs. All rights reserved.