notice hopefully gone now
[mediawiki.git] / PHPTAL-NP-0.7.0 / libs / PEAR.php
blob7f034b7b0a9952e535e92acc1409a54f0cbdaeda
1 <?php
2 //
3 // +----------------------------------------------------------------------+
4 // | PHP Version 4 |
5 // +----------------------------------------------------------------------+
6 // | Copyright (c) 1997-2003 The PHP Group |
7 // +----------------------------------------------------------------------+
8 // | This source file is subject to version 2.0 of the PHP license, |
9 // | that is bundled with this package in the file LICENSE, and is |
10 // | available at through the world-wide-web at |
11 // | http://www.php.net/license/2_02.txt. |
12 // | If you did not receive a copy of the PHP license and are unable to |
13 // | obtain it through the world-wide-web, please send a note to |
14 // | license@php.net so we can mail you a copy immediately. |
15 // +----------------------------------------------------------------------+
16 // | Authors: Sterling Hughes <sterling@php.net> |
17 // | Stig Bakken <ssb@fast.no> |
18 // | Tomas V.V.Cox <cox@idecnet.com> |
19 // +----------------------------------------------------------------------+
21 // $Id$
24 define('PEAR_ERROR_RETURN', 1);
25 define('PEAR_ERROR_PRINT', 2);
26 define('PEAR_ERROR_TRIGGER', 4);
27 define('PEAR_ERROR_DIE', 8);
28 define('PEAR_ERROR_CALLBACK', 16);
29 define('PEAR_ZE2', (function_exists('version_compare') &&
30 version_compare(zend_version(), "2-dev", "ge")));
32 if (substr(PHP_OS, 0, 3) == 'WIN') {
33 define('OS_WINDOWS', true);
34 define('OS_UNIX', false);
35 define('PEAR_OS', 'Windows');
36 } else {
37 define('OS_WINDOWS', false);
38 define('OS_UNIX', true);
39 define('PEAR_OS', 'Unix'); // blatant assumption
42 $GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;
43 $GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;
44 $GLOBALS['_PEAR_destructor_object_list'] = array();
45 $GLOBALS['_PEAR_shutdown_funcs'] = array();
46 $GLOBALS['_PEAR_error_handler_stack'] = array();
48 ini_set('track_errors', true);
50 /**
51 * Base class for other PEAR classes. Provides rudimentary
52 * emulation of destructors.
54 * If you want a destructor in your class, inherit PEAR and make a
55 * destructor method called _yourclassname (same name as the
56 * constructor, but with a "_" prefix). Also, in your constructor you
57 * have to call the PEAR constructor: $this->PEAR();.
58 * The destructor method will be called without parameters. Note that
59 * at in some SAPI implementations (such as Apache), any output during
60 * the request shutdown (in which destructors are called) seems to be
61 * discarded. If you need to get any debug information from your
62 * destructor, use error_log(), syslog() or something similar.
64 * IMPORTANT! To use the emulated destructors you need to create the
65 * objects by reference, ej: $obj =& new PEAR_child;
67 * @since PHP 4.0.2
68 * @author Stig Bakken <ssb@fast.no>
69 * @see http://pear.php.net/manual/
71 class PEAR
73 // {{{ properties
75 /**
76 * Whether to enable internal debug messages.
78 * @var bool
79 * @access private
81 var $_debug = false;
83 /**
84 * Default error mode for this object.
86 * @var int
87 * @access private
89 var $_default_error_mode = null;
91 /**
92 * Default error options used for this object when error mode
93 * is PEAR_ERROR_TRIGGER.
95 * @var int
96 * @access private
98 var $_default_error_options = null;
101 * Default error handler (callback) for this object, if error mode is
102 * PEAR_ERROR_CALLBACK.
104 * @var string
105 * @access private
107 var $_default_error_handler = '';
110 * Which class to use for error objects.
112 * @var string
113 * @access private
115 var $_error_class = 'PEAR_Error';
118 * An array of expected errors.
120 * @var array
121 * @access private
123 var $_expected_errors = array();
125 // }}}
127 // {{{ constructor
130 * Constructor. Registers this object in
131 * $_PEAR_destructor_object_list for destructor emulation if a
132 * destructor object exists.
134 * @param string $error_class (optional) which class to use for
135 * error objects, defaults to PEAR_Error.
136 * @access public
137 * @return void
139 function PEAR($error_class = null)
141 $classname = get_class($this);
142 if ($this->_debug) {
143 print "PEAR constructor called, class=$classname\n";
145 if ($error_class !== null) {
146 $this->_error_class = $error_class;
148 while ($classname) {
149 $destructor = "_$classname";
150 if (method_exists($this, $destructor)) {
151 global $_PEAR_destructor_object_list;
152 $_PEAR_destructor_object_list[] = &$this;
153 break;
154 } else {
155 $classname = get_parent_class($classname);
160 // }}}
161 // {{{ destructor
164 * Destructor (the emulated type of...). Does nothing right now,
165 * but is included for forward compatibility, so subclass
166 * destructors should always call it.
168 * See the note in the class desciption about output from
169 * destructors.
171 * @access public
172 * @return void
174 function _PEAR() {
175 if ($this->_debug) {
176 printf("PEAR destructor called, class=%s\n", get_class($this));
180 // }}}
181 // {{{ getStaticProperty()
184 * If you have a class that's mostly/entirely static, and you need static
185 * properties, you can use this method to simulate them. Eg. in your method(s)
186 * do this: $myVar = &PEAR::getStaticProperty('myVar');
187 * You MUST use a reference, or they will not persist!
189 * @access public
190 * @param string $class The calling classname, to prevent clashes
191 * @param string $var The variable to retrieve.
192 * @return mixed A reference to the variable. If not set it will be
193 * auto initialised to NULL.
195 function &getStaticProperty($class, $var)
197 static $properties;
198 return $properties[$class][$var];
201 // }}}
202 // {{{ registerShutdownFunc()
205 * Use this function to register a shutdown method for static
206 * classes.
208 * @access public
209 * @param mixed $func The function name (or array of class/method) to call
210 * @param mixed $args The arguments to pass to the function
211 * @return void
213 function registerShutdownFunc($func, $args = array())
215 $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args);
218 // }}}
219 // {{{ isError()
222 * Tell whether a value is a PEAR error.
224 * @param mixed $data the value to test
225 * @access public
226 * @return bool true if parameter is an error
228 function isError($data) {
229 return (bool)(is_object($data) &&
230 (get_class($data) == 'pear_error' ||
231 is_subclass_of($data, 'pear_error')));
234 // }}}
235 // {{{ setErrorHandling()
238 * Sets how errors generated by this DB object should be handled.
239 * Can be invoked both in objects and statically. If called
240 * statically, setErrorHandling sets the default behaviour for all
241 * PEAR objects. If called in an object, setErrorHandling sets
242 * the default behaviour for that object.
244 * @param int $mode
245 * One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
246 * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE or
247 * PEAR_ERROR_CALLBACK.
249 * @param mixed $options
250 * When $mode is PEAR_ERROR_TRIGGER, this is the error level (one
251 * of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR).
253 * When $mode is PEAR_ERROR_CALLBACK, this parameter is expected
254 * to be the callback function or method. A callback
255 * function is a string with the name of the function, a
256 * callback method is an array of two elements: the element
257 * at index 0 is the object, and the element at index 1 is
258 * the name of the method to call in the object.
260 * When $mode is PEAR_ERROR_PRINT or PEAR_ERROR_DIE, this is
261 * a printf format string used when printing the error
262 * message.
264 * @access public
265 * @return void
266 * @see PEAR_ERROR_RETURN
267 * @see PEAR_ERROR_PRINT
268 * @see PEAR_ERROR_TRIGGER
269 * @see PEAR_ERROR_DIE
270 * @see PEAR_ERROR_CALLBACK
272 * @since PHP 4.0.5
275 function setErrorHandling($mode = null, $options = null)
277 if (isset($this)) {
278 $setmode = &$this->_default_error_mode;
279 $setoptions = &$this->_default_error_options;
280 } else {
281 $setmode = &$GLOBALS['_PEAR_default_error_mode'];
282 $setoptions = &$GLOBALS['_PEAR_default_error_options'];
285 switch ($mode) {
286 case PEAR_ERROR_RETURN:
287 case PEAR_ERROR_PRINT:
288 case PEAR_ERROR_TRIGGER:
289 case PEAR_ERROR_DIE:
290 case null:
291 $setmode = $mode;
292 $setoptions = $options;
293 break;
295 case PEAR_ERROR_CALLBACK:
296 $setmode = $mode;
297 if ((is_string($options) && function_exists($options)) ||
298 (is_array($options) && method_exists(@$options[0], @$options[1])))
300 $setoptions = $options;
301 } else {
302 trigger_error("invalid error callback", E_USER_WARNING);
304 break;
306 default:
307 trigger_error("invalid error mode", E_USER_WARNING);
308 break;
312 // }}}
313 // {{{ expectError()
316 * This method is used to tell which errors you expect to get.
317 * Expected errors are always returned with error mode
318 * PEAR_ERROR_RETURN. Expected error codes are stored in a stack,
319 * and this method pushes a new element onto it. The list of
320 * expected errors are in effect until they are popped off the
321 * stack with the popExpect() method.
323 * Note that this method can not be called statically
325 * @param mixed $code a single error code or an array of error codes to expect
327 * @return int the new depth of the "expected errors" stack
328 * @access public
330 function expectError($code = '*')
332 if (is_array($code)) {
333 array_push($this->_expected_errors, $code);
334 } else {
335 array_push($this->_expected_errors, array($code));
337 return sizeof($this->_expected_errors);
340 // }}}
341 // {{{ popExpect()
344 * This method pops one element off the expected error codes
345 * stack.
347 * @return array the list of error codes that were popped
349 function popExpect()
351 return array_pop($this->_expected_errors);
354 // }}}
355 // {{{ _checkDelExpect()
358 * This method checks unsets an error code if available
360 * @param mixed error code
361 * @return bool true if the error code was unset, false otherwise
362 * @access private
363 * @since PHP 4.3.0
365 function _checkDelExpect($error_code)
367 $deleted = false;
369 foreach ($this->_expected_errors AS $key => $error_array) {
370 if (in_array($error_code, $error_array)) {
371 unset($this->_expected_errors[$key][array_search($error_code, $error_array)]);
372 $deleted = true;
375 // clean up empty arrays
376 if (0 == count($this->_expected_errors[$key])) {
377 unset($this->_expected_errors[$key]);
380 return $deleted;
383 // }}}
384 // {{{ delExpect()
387 * This method deletes all occurences of the specified element from
388 * the expected error codes stack.
390 * @param mixed $error_code error code that should be deleted
391 * @return mixed list of error codes that were deleted or error
392 * @access public
393 * @since PHP 4.3.0
395 function delExpect($error_code)
397 $deleted = false;
399 if ((is_array($error_code) && (0 != count($error_code)))) {
400 // $error_code is a non-empty array here;
401 // we walk through it trying to unset all
402 // values
403 foreach($error_code AS $key => $error) {
404 if ($this->_checkDelExpect($error)) {
405 $deleted = true;
406 } else {
407 $deleted = false;
410 return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
411 } elseif (!empty($error_code)) {
412 // $error_code comes alone, trying to unset it
413 if ($this->_checkDelExpect($error_code)) {
414 return true;
415 } else {
416 return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
418 } else {
419 // $error_code is empty
420 return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME
424 // }}}
425 // {{{ raiseError()
428 * This method is a wrapper that returns an instance of the
429 * configured error class with this object's default error
430 * handling applied. If the $mode and $options parameters are not
431 * specified, the object's defaults are used.
433 * @param mixed $message a text error message or a PEAR error object
435 * @param int $code a numeric error code (it is up to your class
436 * to define these if you want to use codes)
438 * @param int $mode One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
439 * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE or
440 * PEAR_ERROR_CALLBACK.
442 * @param mixed $options If $mode is PEAR_ERROR_TRIGGER, this parameter
443 * specifies the PHP-internal error level (one of
444 * E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR).
445 * If $mode is PEAR_ERROR_CALLBACK, this
446 * parameter specifies the callback function or
447 * method. In other error modes this parameter
448 * is ignored.
450 * @param string $userinfo If you need to pass along for example debug
451 * information, this parameter is meant for that.
453 * @param string $error_class The returned error object will be
454 * instantiated from this class, if specified.
456 * @param bool $skipmsg If true, raiseError will only pass error codes,
457 * the error message parameter will be dropped.
459 * @access public
460 * @return object a PEAR error object
461 * @see PEAR::setErrorHandling
462 * @since PHP 4.0.5
464 function &raiseError($message = null,
465 $code = null,
466 $mode = null,
467 $options = null,
468 $userinfo = null,
469 $error_class = null,
470 $skipmsg = false)
472 // The error is yet a PEAR error object
473 if (is_object($message)) {
474 $code = $message->getCode();
475 $userinfo = $message->getUserInfo();
476 $error_class = $message->getType();
477 $message = $message->getMessage();
480 if (isset($this) && isset($this->_expected_errors) && sizeof($this->_expected_errors) > 0 && sizeof($exp = end($this->_expected_errors))) {
481 if ($exp[0] == "*" ||
482 (is_int(reset($exp)) && in_array($code, $exp)) ||
483 (is_string(reset($exp)) && in_array($message, $exp))) {
484 $mode = PEAR_ERROR_RETURN;
487 // No mode given, try global ones
488 if ($mode === null) {
489 // Class error handler
490 if (isset($this) && isset($this->_default_error_mode)) {
491 $mode = $this->_default_error_mode;
492 $options = $this->_default_error_options;
493 // Global error handler
494 } elseif (isset($GLOBALS['_PEAR_default_error_mode'])) {
495 $mode = $GLOBALS['_PEAR_default_error_mode'];
496 $options = $GLOBALS['_PEAR_default_error_options'];
500 if ($error_class !== null) {
501 $ec = $error_class;
502 } elseif (isset($this) && isset($this->_error_class)) {
503 $ec = $this->_error_class;
504 } else {
505 $ec = 'PEAR_Error';
507 if ($skipmsg) {
508 return new $ec($code, $mode, $options, $userinfo);
509 } else {
510 return new $ec($message, $code, $mode, $options, $userinfo);
514 // }}}
515 // {{{ throwError()
518 * Simpler form of raiseError with fewer options. In most cases
519 * message, code and userinfo are enough.
521 * @param string $message
524 function &throwError($message = null,
525 $code = null,
526 $userinfo = null)
528 if (isset($this)) {
529 return $this->raiseError($message, $code, null, null, $userinfo);
530 } else {
531 return PEAR::raiseError($message, $code, null, null, $userinfo);
535 // }}}
536 // {{{ pushErrorHandling()
539 * Push a new error handler on top of the error handler options stack. With this
540 * you can easily override the actual error handler for some code and restore
541 * it later with popErrorHandling.
543 * @param mixed $mode (same as setErrorHandling)
544 * @param mixed $options (same as setErrorHandling)
546 * @return bool Always true
548 * @see PEAR::setErrorHandling
550 function pushErrorHandling($mode, $options = null)
552 $stack = &$GLOBALS['_PEAR_error_handler_stack'];
553 if (isset($this)) {
554 $def_mode = &$this->_default_error_mode;
555 $def_options = &$this->_default_error_options;
556 } else {
557 $def_mode = &$GLOBALS['_PEAR_default_error_mode'];
558 $def_options = &$GLOBALS['_PEAR_default_error_options'];
560 $stack[] = array($def_mode, $def_options);
562 if (isset($this)) {
563 $this->setErrorHandling($mode, $options);
564 } else {
565 PEAR::setErrorHandling($mode, $options);
567 $stack[] = array($mode, $options);
568 return true;
571 // }}}
572 // {{{ popErrorHandling()
575 * Pop the last error handler used
577 * @return bool Always true
579 * @see PEAR::pushErrorHandling
581 function popErrorHandling()
583 $stack = &$GLOBALS['_PEAR_error_handler_stack'];
584 array_pop($stack);
585 list($mode, $options) = $stack[sizeof($stack) - 1];
586 array_pop($stack);
587 if (isset($this)) {
588 $this->setErrorHandling($mode, $options);
589 } else {
590 PEAR::setErrorHandling($mode, $options);
592 return true;
595 // }}}
596 // {{{ loadExtension()
599 * OS independant PHP extension load. Remember to take care
600 * on the correct extension name for case sensitive OSes.
602 * @param string $ext The extension name
603 * @return bool Success or not on the dl() call
605 function loadExtension($ext)
607 if (!extension_loaded($ext)) {
608 if (OS_WINDOWS) {
609 $suffix = '.dll';
610 } elseif (PHP_OS == 'HP-UX') {
611 $suffix = '.sl';
612 } elseif (PHP_OS == 'AIX') {
613 $suffix = '.a';
614 } elseif (PHP_OS == 'OSX') {
615 $suffix = '.bundle';
616 } else {
617 $suffix = '.so';
619 return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix);
621 return true;
624 // }}}
627 // {{{ _PEAR_call_destructors()
629 function _PEAR_call_destructors()
631 global $_PEAR_destructor_object_list;
632 if (is_array($_PEAR_destructor_object_list) &&
633 sizeof($_PEAR_destructor_object_list))
635 reset($_PEAR_destructor_object_list);
636 while (list($k, $objref) = each($_PEAR_destructor_object_list)) {
637 $classname = get_class($objref);
638 while ($classname) {
639 $destructor = "_$classname";
640 if (method_exists($objref, $destructor)) {
641 $objref->$destructor();
642 break;
643 } else {
644 $classname = get_parent_class($classname);
648 // Empty the object list to ensure that destructors are
649 // not called more than once.
650 $_PEAR_destructor_object_list = array();
653 // Now call the shutdown functions
654 if (is_array($GLOBALS['_PEAR_shutdown_funcs']) AND !empty($GLOBALS['_PEAR_shutdown_funcs'])) {
655 foreach ($GLOBALS['_PEAR_shutdown_funcs'] as $value) {
656 call_user_func_array($value[0], $value[1]);
661 // }}}
663 class PEAR_Error
665 // {{{ properties
667 var $error_message_prefix = '';
668 var $mode = PEAR_ERROR_RETURN;
669 var $level = E_USER_NOTICE;
670 var $code = -1;
671 var $message = '';
672 var $userinfo = '';
673 var $backtrace = null;
675 // }}}
676 // {{{ constructor
679 * PEAR_Error constructor
681 * @param string $message message
683 * @param int $code (optional) error code
685 * @param int $mode (optional) error mode, one of: PEAR_ERROR_RETURN,
686 * PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER or
687 * PEAR_ERROR_CALLBACK
689 * @param mixed $options (optional) error level, _OR_ in the case of
690 * PEAR_ERROR_CALLBACK, the callback function or object/method
691 * tuple.
693 * @param string $userinfo (optional) additional user/debug info
695 * @access public
698 function PEAR_Error($message = 'unknown error', $code = null,
699 $mode = null, $options = null, $userinfo = null)
701 if ($mode === null) {
702 $mode = PEAR_ERROR_RETURN;
704 $this->message = $message;
705 $this->code = $code;
706 $this->mode = $mode;
707 $this->userinfo = $userinfo;
708 if (function_exists("debug_backtrace")) {
709 $this->backtrace = debug_backtrace();
711 if ($mode & PEAR_ERROR_CALLBACK) {
712 $this->level = E_USER_NOTICE;
713 $this->callback = $options;
714 } else {
715 if ($options === null) {
716 $options = E_USER_NOTICE;
718 $this->level = $options;
719 $this->callback = null;
721 if ($this->mode & PEAR_ERROR_PRINT) {
722 if (is_null($options) || is_int($options)) {
723 $format = "%s";
724 } else {
725 $format = $options;
727 printf($format, $this->getMessage());
729 if ($this->mode & PEAR_ERROR_TRIGGER) {
730 trigger_error($this->getMessage(), $this->level);
732 if ($this->mode & PEAR_ERROR_DIE) {
733 $msg = $this->getMessage();
734 if (is_null($options) || is_int($options)) {
735 $format = "%s";
736 if (substr($msg, -1) != "\n") {
737 $msg .= "\n";
739 } else {
740 $format = $options;
742 die(sprintf($format, $msg));
744 if ($this->mode & PEAR_ERROR_CALLBACK) {
745 if (is_string($this->callback) && strlen($this->callback)) {
746 call_user_func($this->callback, $this);
747 } elseif (is_array($this->callback) &&
748 sizeof($this->callback) == 2 &&
749 is_object($this->callback[0]) &&
750 is_string($this->callback[1]) &&
751 strlen($this->callback[1])) {
752 @call_user_func($this->callback, $this);
757 // }}}
758 // {{{ getMode()
761 * Get the error mode from an error object.
763 * @return int error mode
764 * @access public
766 function getMode() {
767 return $this->mode;
770 // }}}
771 // {{{ getCallback()
774 * Get the callback function/method from an error object.
776 * @return mixed callback function or object/method array
777 * @access public
779 function getCallback() {
780 return $this->callback;
783 // }}}
784 // {{{ getMessage()
788 * Get the error message from an error object.
790 * @return string full error message
791 * @access public
793 function getMessage()
795 return ($this->error_message_prefix . $this->message);
799 // }}}
800 // {{{ getCode()
803 * Get error code from an error object
805 * @return int error code
806 * @access public
808 function getCode()
810 return $this->code;
813 // }}}
814 // {{{ getType()
817 * Get the name of this error/exception.
819 * @return string error/exception name (type)
820 * @access public
822 function getType()
824 return get_class($this);
827 // }}}
828 // {{{ getUserInfo()
831 * Get additional user-supplied information.
833 * @return string user-supplied information
834 * @access public
836 function getUserInfo()
838 return $this->userinfo;
841 // }}}
842 // {{{ getDebugInfo()
845 * Get additional debug information supplied by the application.
847 * @return string debug information
848 * @access public
850 function getDebugInfo()
852 return $this->getUserInfo();
855 // }}}
856 // {{{ getBacktrace()
859 * Get the call backtrace from where the error was generated.
860 * Supported with PHP 4.3.0 or newer.
862 * @param int $frame (optional) what frame to fetch
863 * @return array Backtrace, or NULL if not available.
864 * @access public
866 function getBacktrace($frame = null)
868 if ($frame === null) {
869 return $this->backtrace;
871 return $this->backtrace[$frame];
874 // }}}
875 // {{{ addUserInfo()
877 function addUserInfo($info)
879 if (empty($this->userinfo)) {
880 $this->userinfo = $info;
881 } else {
882 $this->userinfo .= " ** $info";
886 // }}}
887 // {{{ toString()
890 * Make a string representation of this object.
892 * @return string a string with an object summary
893 * @access public
895 function toString() {
896 $modes = array();
897 $levels = array(E_USER_NOTICE => 'notice',
898 E_USER_WARNING => 'warning',
899 E_USER_ERROR => 'error');
900 if ($this->mode & PEAR_ERROR_CALLBACK) {
901 if (is_array($this->callback)) {
902 $callback = get_class($this->callback[0]) . '::' .
903 $this->callback[1];
904 } else {
905 $callback = $this->callback;
907 return sprintf('[%s: message="%s" code=%d mode=callback '.
908 'callback=%s prefix="%s" info="%s"]',
909 get_class($this), $this->message, $this->code,
910 $callback, $this->error_message_prefix,
911 $this->userinfo);
913 if ($this->mode & PEAR_ERROR_PRINT) {
914 $modes[] = 'print';
916 if ($this->mode & PEAR_ERROR_TRIGGER) {
917 $modes[] = 'trigger';
919 if ($this->mode & PEAR_ERROR_DIE) {
920 $modes[] = 'die';
922 if ($this->mode & PEAR_ERROR_RETURN) {
923 $modes[] = 'return';
925 return sprintf('[%s: message="%s" code=%d mode=%s level=%s '.
926 'prefix="%s" info="%s"]',
927 get_class($this), $this->message, $this->code,
928 implode("|", $modes), $levels[$this->level],
929 $this->error_message_prefix,
930 $this->userinfo);
933 // }}}
936 register_shutdown_function("_PEAR_call_destructors");
939 * Local Variables:
940 * mode: php
941 * tab-width: 4
942 * c-basic-offset: 4
943 * End: