1 | <?php |
||
25 | class Observable implements \PEIP\INF\Event\Observable { |
||
26 | |||
27 | protected $observedObject; |
||
28 | |||
29 | protected $observers = array(); |
||
30 | |||
31 | protected $hasChanged = false; |
||
32 | |||
33 | |||
34 | /** |
||
35 | * @access public |
||
36 | * @param $observedObject |
||
37 | * @return |
||
38 | */ |
||
39 | public function __construct($observedObject){ |
||
42 | |||
43 | protected function setObserved($observedObject){ |
||
50 | |||
51 | /** |
||
52 | * @access public |
||
53 | * @param $observer |
||
54 | * @return |
||
55 | */ |
||
56 | public function addObserver(\PEIP\INF\Event\Observer $observer){ |
||
59 | |||
60 | |||
61 | /** |
||
62 | * @access public |
||
63 | * @param $observer |
||
64 | * @return |
||
65 | */ |
||
66 | public function deleteObserver(\PEIP\INF\Event\Observer $observer){ |
||
74 | |||
75 | |||
76 | /** |
||
77 | * @access public |
||
78 | * @param $arguments |
||
79 | * @return |
||
80 | */ |
||
81 | public function notifyObservers(array $arguments = array()){ |
||
88 | |||
89 | |||
90 | /** |
||
91 | * @access public |
||
92 | * @return |
||
93 | */ |
||
94 | public function countObservers(){ |
||
97 | |||
98 | |||
99 | /** |
||
100 | * @access public |
||
101 | * @return |
||
102 | */ |
||
103 | public function hasChanged(){ |
||
106 | |||
107 | |||
108 | /** |
||
109 | * @access public |
||
110 | * @return |
||
111 | */ |
||
112 | public function setChanged(){ |
||
115 | |||
116 | |||
117 | /** |
||
118 | * @access public |
||
119 | * @return |
||
120 | */ |
||
121 | public function clearChanged(){ |
||
124 | |||
125 | |||
126 | |||
127 | |||
128 | } |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.