Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Exception.php

function PEAR_Exception::addObserver

Add an exception observer

Parameters

mixed $callback - A valid php callback, see php func is_callable():

  • A PEAR_Exception::OBSERVER_* constant
  • An array(const PEAR_Exception::OBSERVER_*, mixed $options)

string $label The name of the observer. Use this if you want: to remove it later with removeObserver()

Return value

void

File

vendor/pear/pear_exception/PEAR/Exception.php, line 161

Class

PEAR_Exception
Base PEAR_Exception Class

Code

public static function addObserver($callback, $label = 'default') {
    self::$_observers[$label] = $callback;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal