Translated using Weblate (Danish)
[phpmyadmin.git] / libraries / StringAbstractType.class.php
blob6424844a2c88adbd46ad1314ffd930d5c1bb678e
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Common functions for classes based on PMA_StringByte interface.
6 * @package PhpMyAdmin-String
7 */
8 if (! defined('PHPMYADMIN')) {
9 exit;
12 require_once 'libraries/StringType.int.php';
14 /**
15 * Implements PMA_StringByte interface using native PHP functions.
17 * @package PhpMyAdmin-String
19 abstract class PMA_StringAbstractType implements PMA_StringType
21 /**
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);