Session/src/Message.php
public function add($message, $scope = 'default')
    {
        $key = md5($scope.'~'.$message);
        $item = ['message' => $message, 'scope' => $scope];

        // don't add duplicates
        if (!array_key_exists($key, $this->messages)) {
            $this->messages[$key] = $item;
        }

        return $this;
    }
public function add($message, $scope = 'default')
    {
        $key = md5($scope.'~'.$message);
        $item = ['message' => $message, 'scope' => $scope];

        // don't add duplicates
        if (!array_key_exists($key, $this->messages)) {
            $this->messages[$key] = $item;
        }

        return $this;
    }
public function add ( $ message , $ scope = 'default' ) { $ key = md5 ( $ scope . '~' . $ message ) ; $ item = [ 'message' => $ message , 'scope' => $ scope ] ; // don't add duplicates if ( ! array_key_exists ( $ key , $ this -> messages ) ) { $ this -> messages [ $ key ] = $ item ; } return $ this ; }
Add message to the queue.

@param string $message
@param string $scope
@return $this
Add message to the queue .