* @subpackage util
* @category Community Framework
*/
-class ArrayUtil {
+final class ArrayUtil {
/**
* Applies StringUtil::trim() to all elements of an array.
*
return $array;
}
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class ClassUtil {
+final class ClassUtil {
/**
* Checks whether the given objects are equal.
* Objects are considered equal, when they are instances of the same class and all attributes are equal.
return false;
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-abstract class CronjobUtil {
+final class CronjobUtil {
/**
* indicates if day of month is restricted (not '*')
* @var boolean
}
}
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class DateUtil {
+final class DateUtil {
/**
* name of the default date format language variable
* @var string
return 0;
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class DirectoryUtil {
+final class DirectoryUtil {
/**
* @var \DirectoryIterator
*/
* @subpackage util
* @category Community Framework
*/
-class FileUtil {
+final class FileUtil {
/**
* finfo instance
* @var \finfo
return self::$finfo->file($filename);
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class HeaderUtil {
+final class HeaderUtil {
/**
* alias to php setcookie() function
*/
));
WCF::getTPL()->display('redirect');
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class ImageUtil {
+final class ImageUtil {
/**
* Checks the content of an image for bad sections.
* e.g. the use of javascript.
default: return '';
}
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class JSON {
+final class JSON {
/**
* Returns the JSON representation of a value.
*
public static function getLastError() {
return json_last_error();
}
+
+ private function __construct() { }
}
\ No newline at end of file
* @subpackage util
* @category Community Framework
*/
-class MathUtil {
+final class MathUtil {
/**
* Generates a random value.
*
// generate random value
return (($min !== null && $max !== null) ? mt_rand($min, $max) : mt_rand());
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class OptionUtil {
+final class OptionUtil {
/**
* Returns a list of the available options.
*
return $result;
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class StringStack {
+final class StringStack {
protected static $stringStack = array();
/**
return array();
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class StringUtil {
+final class StringUtil {
const HTML_PATTERN = '~</?[a-z]+[1-6]?
(?:\s*[a-z]+\s*=\s*(?:
"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|[^\s>]
return str_shuffle($password);
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class StyleUtil {
+final class StyleUtil {
/**
* Converts css code from LTR to RTL.
*
$file->close();
@chmod(WCF_DIR . 'acp/style/style-rtl.css', 0777);
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class UserUtil {
+final class UserUtil {
protected static $privateIpList = array("/^0\./", "/^127\.0\.0\.1/", "/^192\.168\..*/", "/^172\.16\..*/", "/^10..*/", "/^224..*/", "/^240..*/");
/**
return StringUtil::substring(FileUtil::unifyDirSeperator($REQUEST_URI), 0, 255);
}
+
+ private function __construct() { }
}
* @subpackage util
* @category Community Framework
*/
-class XML {
+final class XML {
/**
* DOMDocument object
* @var \DOMDocument
/**
* Prepares a new instance of DOMDocument and enables own error handler for libxml.
- */
+ */
public function __construct() {
libxml_use_internal_errors(true);
$this->document = new \DOMDocument('1.0', 'UTF-8');