PHP Manual

  • English French German Portuguese Spanish
  1. Function Reference
  2. Other Basic Extensions
  3. SPL
  4. Miscellaneous Classes and Interfaces
  5. SplSubject
Miscellaneous Classes and Interfaces ArrayObject SplObserver SplSubject
  • SplObserver::update
  • SplSubject::attach

The SplSubject interface

(PHP 5 >= 5.1.0)

Introduction

The SplSubject interface is used alongside SplObserver to implement the Observer Design Pattern.

Interface synopsis

SplSubject {
/* Methods */
abstract public void attach ( SplObserver $observer )
abstract public void detach ( SplObserver $observer )
abstract public void notify ( void )
}

Table of Contents

  • SplSubject::attach — Attach an SplObserver
  • SplSubject::detach — Detach an observer
  • SplSubject::notify — Notify an observer
© Copyright © 2001-2015 The PHP Group.

© Copyright 2014. Diseñado por PHP Manual usando jfCMS.