ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ErrorCode.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class ErrorCode
6 {
10  protected static $errorCodeMap = [
11  '#NULL!' => 0x00,
12  '#DIV/0!' => 0x07,
13  '#VALUE!' => 0x0F,
14  '#REF!' => 0x17,
15  '#NAME?' => 0x1D,
16  '#NUM!' => 0x24,
17  '#N/A' => 0x2A,
18  ];
19 
20  public static function error(string $errorCode): int
21  {
22  if (array_key_exists($errorCode, self::$errorCodeMap)) {
23  return self::$errorCodeMap[$errorCode];
24  }
25 
26  return 0;
27  }
28 }
static static error(string $errorCode)
Definition: ErrorCode.php:20
$errorCode