1 | <?php |
||
17 | abstract class Sapi |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * Are we in a web environment? |
||
22 | * |
||
23 | * @return boolean |
||
24 | */ |
||
25 | public static function isWeb() |
||
29 | |||
30 | /** |
||
31 | * Are we in a cli environment? |
||
32 | * |
||
33 | * @return boolean |
||
34 | */ |
||
35 | public static function isCli() |
||
39 | |||
40 | /** |
||
41 | * Are we in a cgi environment? |
||
42 | * |
||
43 | * @return boolean |
||
44 | */ |
||
45 | public static function isCgi() |
||
49 | |||
50 | /** |
||
51 | * Are we served through Apache[2]? |
||
52 | * |
||
53 | * @return boolean |
||
54 | */ |
||
55 | public static function isApache() |
||
59 | |||
60 | /** |
||
61 | * Are we served through IIS? |
||
62 | * |
||
63 | * @return boolean |
||
64 | */ |
||
65 | public static function isIIS() |
||
69 | |||
70 | /** |
||
71 | * Are we served through PHP's built-in web server. |
||
72 | * |
||
73 | * @return bool |
||
74 | */ |
||
75 | public static function isBuiltInWebServer() |
||
79 | |||
80 | /** |
||
81 | * Are we served through HHVM virtual machine |
||
82 | * |
||
83 | * @return bool |
||
84 | */ |
||
85 | public static function isHHVM() |
||
89 | |||
90 | /** |
||
91 | * @return bool |
||
92 | */ |
||
93 | public static function isWindows() |
||
97 | } |
||
98 |