Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 5 |
| iaObserver | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
56.00 | |
0.00% |
0 / 5 |
| set_iaSplObserverPriority | n/a |
0 / 0 |
1 | n/a |
0 / 0 |
|||||
| get_iaSplObserverPriority | n/a |
0 / 0 |
1 | n/a |
0 / 0 |
|||||
| iaSplSubject_attach | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 3 |
|||
| iaSplSubject_getTag | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 1 |
|||
| iaSplSubject_getEvent | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace ia\SubjectObserver; | |
| trait iaObserver { | |
| protected $iaSplObserverPriority = 1000; | |
| public function set_iaSplObserverPriority($priority) {$this->iaSplObserverPriority = $priority;} | |
| public function get_iaSplObserverPriority() {return $this->iaSplObserverPriority;} | |
| public function iaSplSubject_attach(SplSubject $SplSubject, $priority = 1000) { | |
| $this->set_iaSplObserverPriority($priority); | |
| $SplSubject->attach($this); | |
| } | |
| public function iaSplSubject_getTag(SplSubject $SplSubject) { | |
| return method_exists($SplSubject,'get_iaSplSubjectTag') ? $SplSubject->get_iaSplSubjectTag() : ''; | |
| } | |
| public function iaSplSubject_getEvent(SplSubject $SplSubject) { | |
| return method_exists($SplSubject,'get_iaSplSubjectEvent') ? $SplSubject->get_iaSplSubjectEvent() : ''; | |
| } | |
| } |