2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Common functions for classes based on PMA_StringByte interface.
6 * @package PhpMyAdmin-String
8 if (! defined('PHPMYADMIN')) {
12 require_once 'libraries/StringType.int.php';
15 * Implements PMA_StringByte interface using native PHP functions.
17 * @package PhpMyAdmin-String
19 abstract class PMA_StringAbstractType
implements PMA_StringType
22 * Checks if a number is in a range
24 * @param integer $num number to check for
25 * @param integer $lower lower bound
26 * @param integer $upper upper bound
28 * @return boolean whether the number is in the range or not
30 public function numberInRangeInclusive($num, $lower, $upper)
32 return ($num >= $lower && $num <= $upper);