CHips L MINI SHELL

CHips L pro

Current Path : /opt/cpanel/ea-php54/root/usr/share/pear/RVSeagullMod/lib/SGL/
Upload File :
Current File : //opt/cpanel/ea-php54/root/usr/share/pear/RVSeagullMod/lib/SGL/Observer.php

<?php
/**
 * Abstract model controller for all the 'manager' classes.
 *
 * @package SGL
 * @author  Demian Turner <demian@phpkitchen.com>
 * @abstract
 */
class SGL_Observer
{
    public function update($observable) {}
}

/**
 * Abstract model controller for all the 'manager' classes.
 *
 * @package SGL
 * @author  Demian Turner <demian@phpkitchen.com>
 * @abstract
 */
class SGL_Observable
{
    var $aObservers = array();

    public function attach($observer)
    {
        $this->aObservers[] = $observer;
    }

    public function detach($observer)
    {
        $this->aObservers = array_diff($this->aObservers, array($observer));
    }

    public function notify()
    {
        foreach ($this->aObservers as $obs) {
            $returnVal = $obs->update($this);
            if (SGL::isError($returnVal)) {
                SGL::raiseError($returnVal->getMessage(), $returnVal->getCode());
            }
        }
    }

    public function getStatus() {}
}
?>

Copyright 2K16 - 2K18 Indonesian Hacker Rulez