1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* JPGraph v4.0.3 |
5
|
|
|
*/ |
6
|
|
|
|
7
|
|
|
namespace Amenadiel\JpGraph\Util; |
8
|
|
|
|
9
|
|
|
// |
10
|
|
|
// A wrapper class that is used to access the specified error object |
11
|
|
|
// (to hide the global error parameter and avoid having a GLOBAL directive |
12
|
|
|
// in all methods. |
13
|
|
|
// |
14
|
|
|
class JpGraphError |
15
|
|
|
{ |
16
|
|
|
private static $__iImgFlg = true; |
17
|
|
|
private static $__iLogFile = ''; |
18
|
|
|
private static $__iTitle = 'JpGraph Error: '; |
19
|
|
|
|
20
|
|
|
public static function Raise($aMsg, $aHalt = true) |
|
|
|
|
21
|
|
|
{ |
22
|
|
|
throw new JpGraphException($aMsg); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
public static function SetErrLocale($aLoc) |
26
|
|
|
{ |
27
|
|
|
global $__jpg_err_locale; |
28
|
|
|
$__jpg_err_locale = $aLoc; |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
public static function RaiseL($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null) |
32
|
|
|
{ |
33
|
|
|
throw new JpGraphExceptionL($errnbr, $a1, $a2, $a3, $a4, $a5); |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
public static function SetImageFlag($aFlg = true) |
37
|
|
|
{ |
38
|
|
|
self::$__iImgFlg = $aFlg; |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
public static function GetImageFlag() |
42
|
|
|
{ |
43
|
|
|
return self::$__iImgFlg; |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
public static function SetLogFile($aFile) |
47
|
|
|
{ |
48
|
|
|
self::$__iLogFile = $aFile; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
public static function GetLogFile() |
52
|
|
|
{ |
53
|
|
|
return self::$__iLogFile; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
public static function SetTitle($aTitle) |
57
|
|
|
{ |
58
|
|
|
self::$__iTitle = $aTitle; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
public static function GetTitle() |
62
|
|
|
{ |
63
|
|
|
return self::$__iTitle; |
64
|
|
|
} |
65
|
|
|
} |
66
|
|
|
|
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.