Class Log_composite

Description

The Log_composite:: class implements a Composite pattern which allows multiple Log implementations to receive the same events.

  • example: example not found
  • since: Horde 1.3
  • since: Log 1.0
  • author: Chuck Hagenbuch <chuck@horde.org>
  • author: Jon Parise <jon@php.net>

Located in /maintenance/libraries/pear/Log/composite.php (line 23)

Log
   |
   --Log_composite
Variable Summary
 array $_children
Method Summary
 Log_composite Log_composite ([boolean $name = false], [boolean $ident = false], [boolean $conf = false], [boolean $level = PEAR_LOG_DEBUG])
 boolean addChild (object &$child)
 void close ()
 void flush ()
 boolean isComposite ()
 boolean log (mixed $message, [string $priority = null])
 void open ()
 boolean removeChild (object $child)
 void setIdent (string $ident)
Variables
array $_children = array() (line 32)

Array holding all of the Log instances to which log events should be sent.

  • access: private

Inherited Variables

Inherited from Log

Log::$_id
Log::$_ident
Log::$_listeners
Log::$_mask
Log::$_opened
Log::$_priority
Methods
Constructor Log_composite (line 45)

Constructs a new composite Log object.

  • access: public
Log_composite Log_composite ([boolean $name = false], [boolean $ident = false], [boolean $conf = false], [boolean $level = PEAR_LOG_DEBUG])
  • boolean $name: This parameter is ignored.
  • boolean $ident: This parameter is ignored.
  • boolean $conf: This parameter is ignored.
  • boolean $level: This parameter is ignored.
addChild (line 163)

Adds a Log instance to the list of children.

  • return: True if the Log instance was successfully added.
  • access: public
boolean addChild (object &$child)
  • object $child: The Log instance to add.
close (line 70)

Closes any child instances.

  • access: public
void close ()

Redefinition of:
Log::close()
Abstract implementation of the close() method.
flush (line 86)

Flushes all open child instances.

  • since: Log 1.8.2
  • access: public
void flush ()

Redefinition of:
Log::flush()
Abstract implementation of the flush() method.
isComposite (line 134)

Returns true if this is a composite.

  • return: True if this is a composite class.
  • access: public
boolean isComposite ()

Redefinition of:
Log::isComposite()
Indicates whether this is a composite class.
log (line 111)

Sends $message and $priority to each child of this composite.

  • return: True if the entry is successfully logged.
  • access: public
boolean log (mixed $message, [string $priority = null])
  • mixed $message: String or object containing the message to log.
  • string $priority: (optional) The priority of the message. Valid values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.

Redefinition of:
Log::log()
Abstract implementation of the log() method.
open (line 55)

Opens the child connections.

  • access: public
void open ()

Redefinition of:
Log::open()
Abstract implementation of the open() method.
removeChild (line 184)

Removes a Log instance from the list of children.

  • return: True if the Log instance was successfully removed.
  • access: public
boolean removeChild (object $child)
  • object $child: The Log instance to remove.
setIdent (line 147)

Sets this identification string for all of this composite's children.

  • since: Log 1.6.7
  • access: public
void setIdent (string $ident)
  • string $ident: The new identification string.

Redefinition of:
Log::setIdent()
Sets this Log instance's identification string.

Inherited Methods

Inherited From Log

 Log::alert()
 Log::attach()
 Log::close()
 Log::crit()
 Log::debug()
 Log::detach()
 Log::emerg()
 Log::err()
 Log::factory()
 Log::flush()
 Log::getIdent()
 Log::getMask()
 Log::getPriority()
 Log::info()
 Log::isComposite()
 Log::log()
 Log::MASK()
 Log::notice()
 Log::open()
 Log::priorityToString()
 Log::setIdent()
 Log::setMask()
 Log::setPriority()
 Log::singleton()
 Log::UPTO()
 Log::warning()
 Log::_announce()
 Log::_extractMessage()
 Log::_isMasked()

Documentation generated on Fri, 3 Dec 2004 12:26:25 +0000 by phpDocumentor 1.3.0RC3