1 | <?php |
||
8 | class CounterObserver implements \SplObserver |
||
9 | { |
||
10 | /** |
||
11 | * @var int |
||
12 | */ |
||
13 | protected $count = 0; |
||
14 | |||
15 | /** |
||
16 | * @see SplObserver::update() |
||
17 | */ |
||
18 | 2 | public function update(\SplSubject $subject) |
|
22 | |||
23 | /** |
||
24 | * @return int |
||
25 | */ |
||
26 | 2 | public function getCount() |
|
30 | |||
31 | /** |
||
32 | * |
||
33 | */ |
||
34 | 1 | public function resetCount() |
|
38 | } |
||
39 |