The SplSubject interface
(PHP 5 >= 5.1.0, PHP 7, PHP 8)
Introduction
The SplSubject interface is used alongside SplObserver to implement the Observer Design Pattern.
Interface synopsis
interface SplSubject {
/* Methods */
}Table of Contents
- SplSubject::attach — Attach an SplObserver
- SplSubject::detach — Detach an observer
- SplSubject::notify — Notify an observer
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
