added new socket manager, errorhandling and testing is not finished yet

This commit is contained in:
kremsy
2015-06-21 20:43:18 +02:00
parent eaf8819a57
commit fc5a3e04b6
32 changed files with 2627 additions and 0 deletions

View File

@ -0,0 +1,62 @@
<?php
namespace React\EventLoop\Timer;
use React\EventLoop\LoopInterface;
interface TimerInterface
{
/**
* Get the loop with which this timer is associated
*
* @return LoopInterface
*/
public function getLoop();
/**
* Get the interval after which this timer will execute, in seconds
*
* @return float
*/
public function getInterval();
/**
* Get the callback that will be executed when this timer elapses
*
* @return callable
*/
public function getCallback();
/**
* Set arbitrary data associated with timer
*
* @param mixed $data
*/
public function setData($data);
/**
* Get arbitrary data associated with timer
*
* @return mixed
*/
public function getData();
/**
* Determine whether the time is periodic
*
* @return bool
*/
public function isPeriodic();
/**
* Determine whether the time is active
*
* @return bool
*/
public function isActive();
/**
* Cancel this timer
*/
public function cancel();
}