403Webshell
Server IP : 172.67.187.206  /  Your IP : 172.71.28.156
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Inetpub/www/myschool/triamudom/tuprblearn/lib/horde/framework/Horde/Imap/Client/Base/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/myschool/triamudom/tuprblearn/lib/horde/framework/Horde/Imap/Client/Base/Alerts.php
<?php
/**
 * Copyright 2014-2017 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file LICENSE for license information (LGPL). If you
 * did not receive this file, see http://www.horde.org/licenses/lgpl21.
 *
 * @category  Horde
 * @copyright 2014-2017 Horde LLC
 * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
 * @package   Imap_Client
 */

/**
 * Handle IMAP alerts sent from the server.
 *
 * @author    Michael Slusarz <[email protected]>
 * @category  Horde
 * @copyright 2014-2017 Horde LLC
 * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
 * @package   Imap_Client
 * @since     2.24.0
 */
class Horde_Imap_Client_Base_Alerts
implements SplSubject
{
    /**
     * Alert data.
     *
     * @var object
     */
    protected $_alert;

    /**
     * Observers.
     *
     * @var array
     */
    protected $_observers = array();

    /**
     * Add an alert.
     *
     * @param string $alert  The alert string.
     * @param string $type   The alert type.
     */
    public function add($alert, $type = null)
    {
        $this->_alert = new stdClass;
        $this->_alert->alert = $alert;
        if (!is_null($type)) {
            $this->_alert->type = $type;
        }

        $this->notify();
    }

    /**
     * Returns the last alert received.
     *
     * @return object  Alert information. Object with these properties:
     * <pre>
     *   - alert: (string) Alert string.
     *   - type: (string) [OPTIONAL] Alert type.
     * </pre>
     */
    public function getLast()
    {
        return $this->_alert;
    }

    /* SplSubject methods. */

    /**
     */
    public function attach(SplObserver $observer)
    {
        $this->detach($observer);
        $this->_observers[] = $observer;
    }

    /**
     */
    public function detach(SplObserver $observer)
    {
        if (($key = array_search($observer, $this->_observers, true)) !== false) {
            unset($this->_observers[$key]);
        }
    }

    /**
     * Notification is triggered internally whenever the object's internal
     * data storage is altered.
     */
    public function notify()
    {
        foreach ($this->_observers as $val) {
            $val->update($this);
        }
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit