options['callback']) && is_callable($this->options['callback'])) { $this->callback = $this->options['callback']; } else { 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. * * @since 12.2 * @throws LogException */ public function addEntry(JLogEntry $entry) { // Pass the log entry to the callback function call_user_func($this->callback, $entry); } }