Source for file callback.php
Documentation is available at callback.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Joomla! Callback Log class
* This class allows logging to be handled by a callback function.
* This allows unprecedented flexibility in the way logging can be handled.
* @package Joomla.Platform
* @var callable The function to call when an entry is added - should return True on success
* @param array &$options Log object options.
// Call the parent constructor.
parent::__construct($options);
// Throw an exception if there is not a valid callback
if (isset
($this->options['callback']) &&
is_callable($this->options['callback']))
throw
new JLogException(JText::_('JLogLoggerCallback created without valid callback function.'));
* Method to add an entry to the log.
* @param JLogEntry $entry The log entry object to add to the log.
* @return boolean True on success.
public function addEntry(JLogEntry $entry)
// Pass the log entry to the callback function
Documentation generated on Tue, 19 Nov 2013 14:55:00 +0100 by phpDocumentor 1.4.3