diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-01-18 20:41:32 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-01-18 20:41:32 +0100 |
commit | 3d879d529107c0c9d3f1e6b894d9ed17b6e6c54f (patch) | |
tree | 4807d948cd652645031f75a14bc4b82840c99edd /system/codeigniter/Compat.php | |
parent | 4a9cb96df665485c1f5d0d98cd4723d4e2f45ce8 (diff) |
ExpressionEngine Dev Team in credit
Diffstat (limited to 'system/codeigniter/Compat.php')
-rw-r--r-- | system/codeigniter/Compat.php | 186 |
1 files changed, 93 insertions, 93 deletions
diff --git a/system/codeigniter/Compat.php b/system/codeigniter/Compat.php index 108b0a1aa..82fdf3209 100644 --- a/system/codeigniter/Compat.php +++ b/system/codeigniter/Compat.php @@ -1,94 +1,94 @@ -<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); -/** - * CodeIgniter - * - * An open source application development framework for PHP 4.3.2 or newer - * - * @package CodeIgniter - * @author Rick Ellis - * @copyright Copyright (c) 2006, EllisLab, Inc. - * @license http://www.codeigniter.com/user_guide/license.html - * @link http://www.codeigniter.com - * @since Version 1.0 - * @filesource - */ - -// ------------------------------------------------------------------------ - -/** - * Compatibility Functions - * - * Function overrides for older versions of PHP or PHP environments missing - * certain extensions / libraries - * - * @package CodeIgniter - * @subpackage codeigniter - * @category Compatibility Functions - * @author EllisLab Development Team - * @link http://www.codeigniter.com/user_guide/ - */ - -// ------------------------------------------------------------------------ - -/* - * PHP versions prior to 5.0 don't support the E_STRICT constant - * so we need to explicitly define it otherwise the Exception class - * will generate errors when running under PHP 4 - * - */ -if ( ! defined('E_STRICT')) -{ - define('E_STRICT', 2048); -} - -/** - * ctype_digit() - * - * Determines if a string is comprised only of digits - * http://us.php.net/manual/en/function.ctype_digit.php - * - * @access public - * @param string - * @return bool - */ -if (! function_exists('ctype_digit')) -{ - function ctype_digit($str) - { - if (! is_string($str) OR $str == '') - { - return FALSE; - } - - return ! preg_match('/[^0-9]/', $str); - } -} - -// -------------------------------------------------------------------- - -/** - * ctype_alnum() - * - * Determines if a string is comprised of only alphanumeric characters - * http://us.php.net/manual/en/function.ctype-alnum.php - * - * @access public - * @param string - * @return bool - */ -if (! function_exists('ctype_alnum')) -{ - function ctype_alnum($str) - { - if (! is_string($str) OR $str == '') - { - return FALSE; - } - - return ! preg_match('/[^0-9a-z]/i', $str); - } -} - -// -------------------------------------------------------------------- - +<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * CodeIgniter
+ *
+ * An open source application development framework for PHP 4.3.2 or newer
+ *
+ * @package CodeIgniter
+ * @author ExpressionEngine Dev Team
+ * @copyright Copyright (c) 2006, EllisLab, Inc.
+ * @license http://www.codeigniter.com/user_guide/license.html
+ * @link http://www.codeigniter.com
+ * @since Version 1.0
+ * @filesource
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+ * Compatibility Functions
+ *
+ * Function overrides for older versions of PHP or PHP environments missing
+ * certain extensions / libraries
+ *
+ * @package CodeIgniter
+ * @subpackage codeigniter
+ * @category Compatibility Functions
+ * @author EllisLab Development Team
+ * @link http://www.codeigniter.com/user_guide/
+ */
+
+// ------------------------------------------------------------------------
+
+/*
+ * PHP versions prior to 5.0 don't support the E_STRICT constant
+ * so we need to explicitly define it otherwise the Exception class
+ * will generate errors when running under PHP 4
+ *
+ */
+if ( ! defined('E_STRICT'))
+{
+ define('E_STRICT', 2048);
+}
+
+/**
+ * ctype_digit()
+ *
+ * Determines if a string is comprised only of digits
+ * http://us.php.net/manual/en/function.ctype_digit.php
+ *
+ * @access public
+ * @param string
+ * @return bool
+ */
+if (! function_exists('ctype_digit'))
+{
+ function ctype_digit($str)
+ {
+ if (! is_string($str) OR $str == '')
+ {
+ return FALSE;
+ }
+
+ return ! preg_match('/[^0-9]/', $str);
+ }
+}
+
+// --------------------------------------------------------------------
+
+/**
+ * ctype_alnum()
+ *
+ * Determines if a string is comprised of only alphanumeric characters
+ * http://us.php.net/manual/en/function.ctype-alnum.php
+ *
+ * @access public
+ * @param string
+ * @return bool
+ */
+if (! function_exists('ctype_alnum'))
+{
+ function ctype_alnum($str)
+ {
+ if (! is_string($str) OR $str == '')
+ {
+ return FALSE;
+ }
+
+ return ! preg_match('/[^0-9a-z]/i', $str);
+ }
+}
+
+// --------------------------------------------------------------------
+
?>
\ No newline at end of file |