1
0
mirror of https://github.com/danog/amp.git synced 2024-12-11 17:09:40 +01:00

Merge pull request #51 from async-interop/supports

Drop Loop::supports
This commit is contained in:
Andrew Carter 2016-05-22 14:26:41 +01:00
commit f2fca2e0a3
3 changed files with 3 additions and 29 deletions

View File

@ -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.
*/

View File

@ -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.
*

View File

@ -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
{