Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit b3f5227

Browse files
committed
Merge branch 'master' of https://github.com/inhere/php-librarys
2 parents 044e3ef + 365862d commit b3f5227

File tree

5 files changed

+21
-477
lines changed

5 files changed

+21
-477
lines changed

src/collections/FixedData.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
namespace inhere\librarys\collections;
1414

15-
use inhere\librarys\exceptions\UnknownCalledException;
15+
use inhere\exceptions\UnknownCalledException;
1616

1717
/**
1818
* Class FixedData

src/console/Message.php

-18
This file was deleted.

src/helpers/PhpHelper.php

+19-14
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)