SplSubject::attach
PHP function
Edit on GitHub ✎
(PHP 5 >= 5.1.0, PHP 7, PHP 8)
Attach an SplObserver
Description
SplSubject::attach(SplObserver $observer): void
Attaches an SplObserver so that it can be notified of updates.
Func
Parameters
observerThe
SplObserverto attach.
Return Values
Void