root/tags/RELEASE_0_9_0B1/patForms/Observer.php

Revision 82, 0.9 kB (checked in by schst, 5 years ago)

added first draft of the observers that allow very flexible error handling (happy documenting, mr. argh!)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 <?php
2 /**
3  * patForms observer base class
4  *
5  * $Id$
6  *
7  * @access        protected
8  * @package        patForms
9  * @subpackage    Observers
10  */
11
12 /**
13  * patForms observer base class
14  *
15  * @access        protected
16  * @package        patForms
17  * @subpackage    Observers
18  * @author        Stephan Schmidt <schst@php-tools.net>
19  * @license        LGPL, see license.txt for details
20  * @link        http://www.php-tools.net
21  */
22 class patForms_Observer
23 {
24    /**
25     * create a new observer
26     *
27     * @access    public
28     * @param    string    id
29     */
30     function patForms_Observer()
31     {
32     }
33     
34    /**
35     * method called by patForms or any patForms_Element to signalise
36     * an event
37     *
38     * @abstract
39     * @access    public
40     * @param    object        Either a patForms or patForms_Element object
41     * @param    string        Property, that has changed (currently only 'status' is possible)
42     * @param    mixed        new value of the property
43     * @return    boolean     should always return true
44     */
45     function notify( &$container, $property, $value )
46     {
47         // your code
48     }
49 }
50 ?>
Note: See TracBrowser for help on using the browser.