parent
6ce61621a4
commit
9fbb248531
@ -14,17 +14,17 @@
|
|||||||
* @author Greg Beaver <cellog@php.net>
|
* @author Greg Beaver <cellog@php.net>
|
||||||
* @copyright 1997-2010 The Authors
|
* @copyright 1997-2010 The Authors
|
||||||
* @license http://opensource.org/licenses/bsd-license.php New BSD License
|
* @license http://opensource.org/licenses/bsd-license.php New BSD License
|
||||||
* @version CVS: $Id: PEAR.php 313023 2011-07-06 19:17:11Z dufuz $
|
* @version CVS: $Id$
|
||||||
* @link http://pear.php.net/package/PEAR
|
* @link http://pear.php.net/package/PEAR
|
||||||
* @since File available since Release 0.1
|
* @since File available since Release 0.1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Serendipity-Patch
|
// Serendipity-Patch
|
||||||
if (defined('PEAR_ERROR_RETURN')) {
|
if (defined('PEAR_ERROR_RETURN')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Serendipity-Patch end
|
// Serendipity-Patch end
|
||||||
|
|
||||||
/**#@+
|
/**#@+
|
||||||
* ERROR constants
|
* ERROR constants
|
||||||
*/
|
*/
|
||||||
@ -39,8 +39,7 @@ define('PEAR_ERROR_CALLBACK', 16);
|
|||||||
*/
|
*/
|
||||||
define('PEAR_ERROR_EXCEPTION', 32);
|
define('PEAR_ERROR_EXCEPTION', 32);
|
||||||
/**#@-*/
|
/**#@-*/
|
||||||
// s9y-todo: Check out PEAR5.php, we need this?
|
define('PEAR_ZE2', (function_exists('version_compare') &&
|
||||||
define('PEAR_ZE2', (false && function_exists('version_compare') &&
|
|
||||||
version_compare(zend_version(), "2-dev", "ge")));
|
version_compare(zend_version(), "2-dev", "ge")));
|
||||||
|
|
||||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||||
@ -85,7 +84,7 @@ $GLOBALS['_PEAR_error_handler_stack'] = array();
|
|||||||
* @author Greg Beaver <cellog@php.net>
|
* @author Greg Beaver <cellog@php.net>
|
||||||
* @copyright 1997-2006 The PHP Group
|
* @copyright 1997-2006 The PHP Group
|
||||||
* @license http://opensource.org/licenses/bsd-license.php New BSD License
|
* @license http://opensource.org/licenses/bsd-license.php New BSD License
|
||||||
* @version Release: 1.9.4
|
* @version Release: 1.9.5
|
||||||
* @link http://pear.php.net/package/PEAR
|
* @link http://pear.php.net/package/PEAR
|
||||||
* @see PEAR_Error
|
* @see PEAR_Error
|
||||||
* @since Class available since PHP 4.0.2
|
* @since Class available since PHP 4.0.2
|
||||||
@ -696,7 +695,7 @@ class PEAR
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OS independant PHP extension load. Remember to take care
|
* OS independent PHP extension load. Remember to take care
|
||||||
* on the correct extension name for case sensitive OSes.
|
* on the correct extension name for case sensitive OSes.
|
||||||
*
|
*
|
||||||
* @param string $ext The extension name
|
* @param string $ext The extension name
|
||||||
@ -795,7 +794,7 @@ function _PEAR_call_destructors()
|
|||||||
* @author Gregory Beaver <cellog@php.net>
|
* @author Gregory Beaver <cellog@php.net>
|
||||||
* @copyright 1997-2006 The PHP Group
|
* @copyright 1997-2006 The PHP Group
|
||||||
* @license http://opensource.org/licenses/bsd-license.php New BSD License
|
* @license http://opensource.org/licenses/bsd-license.php New BSD License
|
||||||
* @version Release: 1.9.4
|
* @version Release: 1.9.5
|
||||||
* @link http://pear.php.net/manual/en/core.pear.pear-error.php
|
* @link http://pear.php.net/manual/en/core.pear.pear-error.php
|
||||||
* @see PEAR::raiseError(), PEAR::throwError()
|
* @see PEAR::raiseError(), PEAR::throwError()
|
||||||
* @since Class available since PHP 4.0.2
|
* @since Class available since PHP 4.0.2
|
||||||
|
33
bundled-libs/PEAR5.php
Normal file
33
bundled-libs/PEAR5.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This is only meant for PHP 5 to get rid of certain strict warning
|
||||||
|
* that doesn't get hidden since it's in the shutdown function
|
||||||
|
*/
|
||||||
|
class PEAR5
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* If you have a class that's mostly/entirely static, and you need static
|
||||||
|
* properties, you can use this method to simulate them. Eg. in your method(s)
|
||||||
|
* do this: $myVar = &PEAR5::getStaticProperty('myclass', 'myVar');
|
||||||
|
* You MUST use a reference, or they will not persist!
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @param string $class The calling classname, to prevent clashes
|
||||||
|
* @param string $var The variable to retrieve.
|
||||||
|
* @return mixed A reference to the variable. If not set it will be
|
||||||
|
* auto initialised to NULL.
|
||||||
|
*/
|
||||||
|
static function &getStaticProperty($class, $var)
|
||||||
|
{
|
||||||
|
static $properties;
|
||||||
|
if (!isset($properties[$class])) {
|
||||||
|
$properties[$class] = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!array_key_exists($var, $properties[$class])) {
|
||||||
|
$properties[$class][$var] = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $properties[$class][$var];
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user