Subversion Repositories php-qbpwcf

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 liveuser 1
<?php
2
 
3
namespace React\EventLoop\Timer;
4
 
5
use React\EventLoop\LoopInterface;
6
 
7
interface TimerInterface
8
{
9
    /**
10
     * Get the loop with which this timer is associated
11
     *
12
     * @return LoopInterface
13
     */
14
    public function getLoop();
15
 
16
    /**
17
     * Get the interval after which this timer will execute, in seconds
18
     *
19
     * @return float
20
     */
21
    public function getInterval();
22
 
23
    /**
24
     * Get the callback that will be executed when this timer elapses
25
     *
26
     * @return callable
27
     */
28
    public function getCallback();
29
 
30
    /**
31
     * Set arbitrary data associated with timer
32
     *
33
     * @param mixed $data
34
     */
35
    public function setData($data);
36
 
37
    /**
38
     * Get arbitrary data associated with timer
39
     *
40
     * @return mixed
41
     */
42
    public function getData();
43
 
44
    /**
45
     * Determine whether the time is periodic
46
     *
47
     * @return bool
48
     */
49
    public function isPeriodic();
50
 
51
    /**
52
     * Determine whether the time is active
53
     *
54
     * @return bool
55
     */
56
    public function isActive();
57
 
58
    /**
59
     * Cancel this timer
60
     */
61
    public function cancel();
62
}