mirror of
https://github.com/danog/amp.git
synced 2024-12-02 17:37:50 +01:00
Add missing documentation
This commit is contained in:
parent
a31f5188cc
commit
3791a7536a
@ -7,6 +7,11 @@ use Interop\Async\Loop\DriverFactory;
|
||||
use Interop\Async\Loop\InvalidWatcherException;
|
||||
use Interop\Async\Loop\UnsupportedFeatureException;
|
||||
|
||||
/**
|
||||
* Accessor to allow global access to the event loop.
|
||||
*
|
||||
* @see \Interop\Async\Loop\Driver
|
||||
*/
|
||||
final class Loop
|
||||
{
|
||||
/**
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
namespace Interop\Async\Loop;
|
||||
|
||||
/**
|
||||
* Event loop driver which implements all basic operations to allow interoperability.
|
||||
*/
|
||||
abstract class Driver
|
||||
{
|
||||
/**
|
||||
@ -106,8 +109,8 @@ abstract class Driver
|
||||
* Multiple watchers on the same signal may be executed in any order.
|
||||
*
|
||||
* NOTE: Installing a same signal on different instances of this interface is deemed undefined behavior.
|
||||
* Implementations may try to detect this, if possible, but are not required to.
|
||||
* This is due to technical limitations of the signals being registered globally per process.
|
||||
* Implementations may try to detect this, if possible, but are not required to. This is due to technical
|
||||
* limitations of the signals being registered globally per process.
|
||||
*
|
||||
* @param int $signo The signal number to monitor.
|
||||
* @param callable(string $watcherId, int $signo, mixed $data) $callback The callback to execute.
|
||||
@ -188,8 +191,8 @@ abstract class Driver
|
||||
*
|
||||
* Therefore packages SHOULD use the following prefix to keys: `vendor.package.`
|
||||
*
|
||||
* @param string $key namespaced storage key
|
||||
* @param mixed $value the value to be stored
|
||||
* @param string $key The namespaced storage key.
|
||||
* @param mixed $value The value to be stored.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@ -208,9 +211,9 @@ abstract class Driver
|
||||
*
|
||||
* Therefore packages SHOULD use the following prefix to keys: `vendor.package.`
|
||||
*
|
||||
* @param string $key namespaced storage key
|
||||
* @param string $key The namespaced storage key.
|
||||
*
|
||||
* @return mixed previously stored value or null if it doesn't exist
|
||||
* @return mixed The previously stored value or null if it doesn't exist.
|
||||
*/
|
||||
final public function getState($key)
|
||||
{
|
||||
@ -254,9 +257,9 @@ abstract class Driver
|
||||
/**
|
||||
* Get the underlying loop handle.
|
||||
*
|
||||
* Example: the uv_loop resource for libuv or the EvLoop object for libev or null for a native driver
|
||||
* Example: the uv_loop resource for libuv or the EvLoop object for libev or null for a native driver.
|
||||
*
|
||||
* Note: This function is *not* exposed in the Loop class; users shall access it directly on the respective loop
|
||||
* NOTE: This function is *not* exposed in the Loop class. Users shall access it directly on the respective loop
|
||||
* instance.
|
||||
*
|
||||
* @return null|object|resource The loop handle the event loop operates on. Null if there is none.
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
namespace Interop\Async\Loop;
|
||||
|
||||
/**
|
||||
* Allows creating new driver instances.
|
||||
*
|
||||
* @see \Interop\Async\Loop::setFactory()
|
||||
*/
|
||||
interface DriverFactory
|
||||
{
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user