public function add($alert, $type = null)
    {
        $this->_alert = new stdClass;
        $this->_alert->alert = $alert;
        if (!is_null($type)) {
            $this->_alert->type = $type;
        }

        $this->notify();
    }
public function add($alert, $type = null)
    {
        $this->_alert = new stdClass;
        $this->_alert->alert = $alert;
        if (!is_null($type)) {
            $this->_alert->type = $type;
        }

        $this->notify();
    }
public function add ( $ alert , $ type = null ) { $ this -> _alert = new stdClass ; $ this -> _alert -> alert = $ alert ; if ( ! is_null ( $ type ) ) { $ this -> _alert -> type = $ type ; } $ this -> notify ( ) ; }
Add an alert.

@param string $alert  The alert string.
@param string $type   The alert type.
Add an alert .