You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$class = (new \ReflectionMethod($this, 'attached'))->getDeclaringClass()->getName();
98
-
trigger_error(__METHOD__ . "(): Methods $class::attached() and $class::detached() are deprecated, use monitor(\$type, [attached], [detached])", E_USER_DEPRECATED);
99
-
$attached = [$this, 'attached'];
100
-
$detached = [$this, 'detached'];
96
+
if (!$attached && !$detached) {
97
+
thrownewNette\InvalidStateException('At least one handler is required.');
101
98
}
102
99
103
100
if (
@@ -121,26 +118,6 @@ final public function unmonitor(string $type): void
121
118
}
122
119
123
120
124
-
/**
125
-
* This method will be called when the component (or component's parent)
126
-
* becomes attached to a monitored object. Do not call this method yourself.
127
-
* @deprecated use monitor($type, $attached)
128
-
*/
129
-
protectedfunctionattached(IComponent$obj): void
130
-
{
131
-
}
132
-
133
-
134
-
/**
135
-
* This method will be called before the component (or component's parent)
136
-
* becomes detached from a monitored object. Do not call this method yourself.
0 commit comments