symfony API

sfEventDispatcher Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.4 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:

sfEventDispatcher implements a dispatcher object.

Method Summary

  • connect($name, $listener)
    Connects a listener to a given event name.
  • mixed disconnect($name, $listener)
    Disconnects a listener for a given event name.
  • sfEvent filter($event, $value)
    Filters a value by calling all listeners of a given event.
  • array getListeners($name)
    Returns all listeners associated with a given event name.
  • Boolean hasListeners($name)
    Returns true if the given event name has some listeners.
  • sfEvent notify($event)
    Notifies all listeners of a given event.
  • sfEvent notifyUntil($event)
    Notifies all listeners of a given event until one returns a non null value.

Method Details

  • connect ($name, $listener) Browse code

    $name An event name
    $listener A PHP callable

    Connects a listener to a given event name.

  • (mixed) disconnect ($name, $listener) Browse code

    $name An event name
    $listener A PHP callable

    Disconnects a listener for a given event name.

    returns false if listener does not exist, null otherwise

  • (sfEvent) filter ($event, $value) Browse code

    $event A sfEvent instance
    $value The value to be filtered

    Filters a value by calling all listeners of a given event.

    returns The sfEvent instance

  • (array) getListeners ($name) Browse code

    $name The event name

    Returns all listeners associated with a given event name.

    returns An array of listeners

  • (Boolean) hasListeners ($name) Browse code

    $name The event name

    Returns true if the given event name has some listeners.

    returns true if some listeners are connected, false otherwise

  • (sfEvent) notify ($event) Browse code

    $event A sfEvent instance

    Notifies all listeners of a given event.

    returns The sfEvent instance

  • (sfEvent) notifyUntil ($event) Browse code

    $event A sfEvent instance

    Notifies all listeners of a given event until one returns a non null value.

    returns The sfEvent instance