array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'class.splsubject.php', 1 => 'SplSubject', ), 'up' => array ( 0 => 'spl.misc.php', 1 => 'その他のクラスおよびインターフェイス', ), 'prev' => array ( 0 => 'splobserver.update.php', 1 => 'SplObserver::update', ), 'next' => array ( 0 => 'splsubject.attach.php', 1 => 'SplSubject::attach', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/spl/splsubject.xml', ), 'extra_header_links' => array ( 'rel' => 'alternate', 'href' => '/manual/en/feeds/class.splsubject.atom', 'type' => 'application/atom+xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.1.0, PHP 7, PHP 8)
SplSubject インターフェイスを SplObserver とともに使うと、Observer パターンを実装することができます。