This repository was archived by the owner on Jan 23, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +21
-477
lines changed Expand file tree Collapse file tree 5 files changed +21
-477
lines changed Original file line number Diff line number Diff line change 1212 */
1313namespace inhere \librarys \collections ;
1414
15- use inhere \librarys \ exceptions \UnknownCalledException ;
15+ use inhere \exceptions \UnknownCalledException ;
1616
1717/**
1818 * Class FixedData
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -156,6 +156,25 @@ public static function isCgi()
156156 return strpos (PHP_SAPI , 'cgi ' ) !== false ? true : false ; # cgi环境
157157 }
158158
159+ /**
160+ * is Cli
161+ * @return boolean
162+ */
163+ public static function isCli ()
164+ {
165+ return PHP_SAPI === 'cli ' ;
166+ }
167+
168+ /**
169+ * is Build In Server
170+ * run server use like: `php -S 127.0.0.1:8085`
171+ * @return boolean
172+ */
173+ public static function isBuiltInServer ()
174+ {
175+ return PHP_SAPI === 'cli-server ' ;
176+ }
177+
159178 /**
160179 * isWeb
161180 * @return boolean
@@ -176,20 +195,6 @@ public static function isWeb()
176195 );
177196 }
178197
179- /**
180- * isCli
181- * @return boolean
182- */
183- public static function isCli ()
184- {
185- return in_array (
186- PHP_SAPI ,
187- array (
188- 'cli ' ,
189- )
190- );
191- }
192-
193198 /**
194199 * isHHVM
195200 * @return boolean
You can’t perform that action at this time.
0 commit comments