This repository has been archived on 2018-04-01. You can view files and clone it, but cannot push or open issues or pull requests.
php-asio/stubs/Signal.php

63 lines
1.3 KiB
PHP

<?php
/**
* php-asio/stubs/Signal.php
*
* This file is a stub of php-asio, which is implemented in extension asio.so.
* For source code of asio.so, see src/ directory.
*
* @author CismonX<admin@cismon.net>
*/
namespace Asio;
/**
* Class Signal
*
* Provides signal handling functionality.
*
* @package Asio
*/
final class Signal implements IoObject
{
/**
* This class can only be instantiated using `Service::addSignal()`.
*/
private function __construct() {}
/**
* Add the specified signal(s) to the signal set.
*
* @param int[] ...$signals[optional]
* @return int : Error code
*/
function add(int... $signals) {}
/**
* Initiate an asynchronous wait against the signal set.
*
* @param callable $callback[optional]
* @param mixed $argument
* @return Future
*/
function wait(callable $callback, $argument = null) {}
/**
* Remove the specified signal(s) from the signal set.
*
* @param int[] ...$signals[optional]
* @return int : Error code
*/
function remove(int... $signals) {}
/**
* Remove all signals from the signal set.
*
* @return int : Error code
*/
function clear() {}
/**
* {@inheritdoc}
*/
function cancel() {}
}