Session/src/Message.php
public function clear($scope = null)
    {
        if ($scope === null) {
            $this->messages = array();
        } else {
            foreach ($this->messages as $key => $message) {
                if ($message['scope'] === $scope) {
                    unset($this->messages[$key]);
                }
            }
        }
        return $this;
    }
public function clear($scope = null)
    {
        if ($scope === null) {
            $this->messages = array();
        } else {
            foreach ($this->messages as $key => $message) {
                if ($message['scope'] === $scope) {
                    unset($this->messages[$key]);
                }
            }
        }
        return $this;
    }
public function clear ( $ scope = null ) { if ( $ scope === null ) { $ this -> messages = array ( ) ; } else { foreach ( $ this -> messages as $ key => $ message ) { if ( $ message [ 'scope' ] === $ scope ) { unset ( $ this -> messages [ $ key ] ) ; } } } return $ this ; }
Clear message queue.

@param string $scope
@return $this
Clear message queue .