Interop\Async\Loop\Driver::setState PHP Method

setState() final public method

This can be used to store loop bound information. Stored information is package private. Packages MUST NOT retrieve the stored state of other packages. Packages MUST use the following prefix for keys: vendor.package.
final public setState ( string $key, mixed $value ) : void
$key string The namespaced storage key.
$value mixed The value to be stored.
return void
    public final function setState($key, $value)
    {
        if ($value === null) {
            unset($this->registry[$key]);
        } else {
            $this->registry[$key] = $value;
        }
    }