Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Foellmann <foellmann@foe-services.de>2014-04-05 17:35:38 +0400
committerChristian Foellmann <foellmann@foe-services.de>2014-04-05 17:35:38 +0400
commit9eb27ef6ebc763ddc6f6278462b8ffeed6de0e36 (patch)
treed3b4a1c7ae68cafb05b9d60040c9c22d457cee62 /libraries/StringCType.class.php
parentd472216554769ba596795f23a70c1809fa8897a3 (diff)
INIT phpmyadmin 4.1.12 multilanguage
Diffstat (limited to 'libraries/StringCType.class.php')
-rw-r--r--libraries/StringCType.class.php110
1 files changed, 110 insertions, 0 deletions
diff --git a/libraries/StringCType.class.php b/libraries/StringCType.class.php
new file mode 100644
index 0000000000..5972f12487
--- /dev/null
+++ b/libraries/StringCType.class.php
@@ -0,0 +1,110 @@
+<?php
+/* vim: set expandtab sw=4 ts=4 sts=4: */
+/**
+ * Implements PMA_StringType interface using the "ctype" extension.
+ * Methods of the "ctype" extension are faster compared to PHP versions of them.
+ *
+ * @package PhpMyAdmin-String
+ * @subpackage CType
+ */
+if (! defined('PHPMYADMIN')) {
+ exit;
+}
+
+require_once 'libraries/StringAbstractType.class.php';
+
+/**
+ * Implements PMA_StringType interface using the "ctype" extension.
+ * Methods of the "ctype" extension are faster compared to PHP versions of them.
+ *
+ * @package PhpMyAdmin-String
+ * @subpackage CType
+ */
+class PMA_StringCType extends PMA_StringAbstractType
+{
+ /**
+ * Checks if a character is an alphanumeric one
+ *
+ * @param string $c character to check for
+ *
+ * @return boolean whether the character is an alphanumeric one or not
+ */
+ public function isAlnum($c)
+ {
+ return ctype_alnum($c);
+ } // end of the "isAlnum()" function
+
+ /**
+ * Checks if a character is an alphabetic one
+ *
+ * @param string $c character to check for
+ *
+ * @return boolean whether the character is an alphabetic one or not
+ */
+ public function isAlpha($c)
+ {
+ return ctype_alpha($c);
+ } // end of the "isAlpha()" function
+
+ /**
+ * Checks if a character is a digit
+ *
+ * @param string $c character to check for
+ *
+ * @return boolean whether the character is a digit or not
+ */
+ public function isDigit($c)
+ {
+ return ctype_digit($c);
+ } // end of the "isDigit()" function
+
+ /**
+ * Checks if a character is an upper alphabetic one
+ *
+ * @param string $c character to check for
+ *
+ * @return boolean whether the character is an upper alphabetic one or not
+ */
+ public function isUpper($c)
+ {
+ return ctype_upper($c);
+ } // end of the "isUpper()" function
+
+
+ /**
+ * Checks if a character is a lower alphabetic one
+ *
+ * @param string $c character to check for
+ *
+ * @return boolean whether the character is a lower alphabetic one or not
+ */
+ public function isLower($c)
+ {
+ return ctype_lower($c);
+ } // end of the "PisLower()" function
+
+ /**
+ * Checks if a character is a space one
+ *
+ * @param string $c character to check for
+ *
+ * @return boolean whether the character is a space one or not
+ */
+ public function isSpace($c)
+ {
+ return ctype_space($c);
+ } // end of the "isSpace()" function
+
+ /**
+ * Checks if a character is an hexadecimal digit
+ *
+ * @param string $c character to check for
+ *
+ * @return boolean whether the character is an hexadecimal digit or not
+ */
+ public function isHexDigit($c)
+ {
+ return ctype_xdigit($c);
+ } // end of the "isHexDigit()" function
+}
+?>