mirror of
https://github.com/danog/amp.git
synced 2024-12-11 17:09:40 +01:00
commit
f2fca2e0a3
13
src/Loop.php
13
src/Loop.php
@ -274,19 +274,6 @@ final class Loop
|
||||
self::get()->setErrorHandler($callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether an optional feature is supported by the current event loop
|
||||
* driver.
|
||||
*
|
||||
* @param int $feature Loop::FEATURE_* constant
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function supports($feature)
|
||||
{
|
||||
return self::get()->supports($feature);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable construction as this is a static class.
|
||||
*/
|
||||
|
@ -146,20 +146,6 @@ interface LoopDriver
|
||||
*/
|
||||
public function setErrorHandler(callable $callback = null);
|
||||
|
||||
/**
|
||||
* Check whether an optional features is supported by this implementation
|
||||
* and system.
|
||||
*
|
||||
* Example: If the implementation can handle signals using PCNTL, but the
|
||||
* PCNTL extension is not available, the feature MUST NOT be marked as
|
||||
* supported.
|
||||
*
|
||||
* @param int $feature FEATURE constant
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function supports($feature);
|
||||
|
||||
/**
|
||||
* Get the underlying loop handle.
|
||||
*
|
||||
|
@ -3,8 +3,9 @@
|
||||
use Interop\Async;
|
||||
|
||||
/**
|
||||
* Must be thrown if an optional feature is not supported by the current driver
|
||||
* or system.
|
||||
* Must be thrown if a feature is not supported by the system.
|
||||
*
|
||||
* This might happen if PCNTL is missing and the loop driver doesn't support another way to dispatch signals.
|
||||
*/
|
||||
class UnsupportedFeatureException extends \RuntimeException
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user