Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ezpEvent Class Reference

## Public Member Functions
| __construct ( $loadGlobalEvents=true)
| registerEventListeners ()
| attach ( $name, $listener)
| detach ( $name, $id)
| notify ( $name, array $params=array())
| filter ( $name, $value)

## Static Public Member Functions
static | getInstance ()
static | resetInstance ()

## Protected Attributes
| $listeners = array()
| $loadGlobalEvents

## Static Protected Attributes
static | $listenerIdNumber = 0
static | $instance = null

## Detailed Description

Definition at line 20 of file ezpevent.php.

## Constructor & Destructor Documentation

## ◆ __construct()

ezpEvent::__construct | ( |  | $loadGlobalEvents = `true` | ) |

Constructer In most cases you would want to use {

See also
  getInstance()} instead

Parameters

  bool | $loadGlobalEvents | Load global events from ini settings

Definition at line 57 of file ezpevent.php.

References $loadGlobalEvents.

## Member Function Documentation

## ◆ attach()

ezpEvent::attach | ( |  | $name,
|  |  | $listener
| ) |  |

Attach an event listener at run time on demand.

Parameters

  string | $name | In the form "content/delete/1" or "content/delete"
  array | string | $listener | A valid PHP callback {

See also
  http://php.net/manual/en/language.pseudo-types.php#language.types.callback}

Returns
  int Listener id, can be used to detach a listener later {

See also
  detach()}

Definition at line 92 of file ezpevent.php.

References $id, and $name.

Referenced by registerEventListeners().

## ◆ detach()

ezpEvent::detach | ( |  | $name,
|  |  | $id
| ) |  |

Detach an event listener by id given when it was added.

Parameters

  string | $name |
  int | $id | The unique id given by {

See also
  attach()}

Returns
  bool True if the listener has been correctly detached

Definition at line 112 of file ezpevent.php.

References $id, and $name.

## ◆ filter()

ezpEvent::filter | ( |  | $name,
|  |  | $value
| ) |  |

Call all listeners of an event and allow them to filter (change) first value

Parameters

  string | $name | In the form "content/delete/1", "content/delete", "content/read"
  array | string | numeric | $value | The value you want to let listeners filter
  array | string | numeric | $value,... | Optional additional values provided to listeners

Returns
  mixed First $value param after being filtered by filters, or unmodified if no filters

Definition at line 152 of file ezpevent.php.

References $name.

## ◆ getInstance()

static ezpEvent::getInstance | ( |  | ) |
| static

Gets instance

Returns
  ezpEvent

Definition at line 176 of file ezpevent.php.

References $instance, and $instance.

Referenced by eZDFSFileHandlerMySQLiBackend\__construct(), ezpbKernelAdmin\__construct(), ezpbKernelWeb\__construct(), ezpKernelWeb\__construct(), ezpSessionHandlerDB\cleanup(), ezpSessionHandlerPHP\cleanup(), ezpSessionHandlerDB\destroy(), ezpSessionHandlerPHP\destroy(), ezpSessionHandlerSymfony\destroy(), eZDisplayResult(), ezpSessionHandlerDB\gc(), ezpSessionHandlerPHP\gc(), ezpSessionHandlerSymfony\gc(), eZDebug\printReport(), ezpSessionHandlerDB\regenerate(), ezpSessionHandlerPHP\regenerate(), ezpSessionHandlerSymfony\regenerate(), ezpbKernelAdmin\requestInit(), ezpbKernelWeb\requestInit(), and ezpKernelWeb\requestInit().

## ◆ notify()

ezpEvent::notify | ( |  | $name,
|  | array | $params = `array()`
| ) |  |

Notify all listeners of an event

Parameters

  string | $name | In the form "content/delete/1", "content/delete", "content/read"
  array | $params | The arguments for the specific event as simple array structure (not hash)

Returns
  bool True if some listener where called

Definition at line 130 of file ezpevent.php.

References $name.

## ◆ registerEventListeners()

ezpEvent::registerEventListeners | ( |  | ) |

Registers the event listeners defined the site.ini files.

Definition at line 65 of file ezpevent.php.

References $event, $listeners, and attach().

## ◆ resetInstance()

static ezpEvent::resetInstance | ( |  | ) |
| static

Resets instance

Definition at line 188 of file ezpevent.php.

References $instance.

## Member Data Documentation

## ◆ $instance

ezpEvent::$instance = null
| static protected

Definition at line 42 of file ezpevent.php.

Referenced by getInstance().

## ◆ $listenerIdNumber

ezpEvent::$listenerIdNumber = 0
| static protected

Definition at line 35 of file ezpevent.php.

## ◆ $listeners

ezpEvent::$listeners = array()
| protected

Definition at line 27 of file ezpevent.php.

Referenced by registerEventListeners().

## ◆ $loadGlobalEvents

ezpEvent::$loadGlobalEvents
| protected

Definition at line 49 of file ezpevent.php.

Referenced by __construct().

The documentation for this class was generated from the following file:

- ezpevent.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.