public function retrieve()
    {
        $messages = null;

        if (\is_null($this->instance)) {
            $this->instance = new static();
            $this->instance->setSessionStore($this->session);

            if ($this->session->has('message')) {
                $messages = \unserialize($this->session->pull('message'), ['allowed_classes' => false]);
            }

            if (\is_array($messages)) {
                $this->instance->merge($messages);
            }
        }

        return $this->instance;
    }
public function retrieve()
    {
        $messages = null;

        if (\is_null($this->instance)) {
            $this->instance = new static();
            $this->instance->setSessionStore($this->session);

            if ($this->session->has('message')) {
                $messages = \unserialize($this->session->pull('message'), ['allowed_classes' => false]);
            }

            if (\is_array($messages)) {
                $this->instance->merge($messages);
            }
        }

        return $this->instance;
    }
public function retrieve ( ) { $ messages = null ; if ( \ is_null ( $ this -> instance ) ) { $ this -> instance = new static ( ) ; $ this -> instance -> setSessionStore ( $ this -> session ) ; if ( $ this -> session -> has ( 'message' ) ) { $ messages = \ unserialize ( $ this -> session -> pull ( 'message' ) , [ 'allowed_classes' => false ] ) ; } if ( \ is_array ( $ messages ) ) { $ this -> instance -> merge ( $ messages ) ; } } return $ this -> instance ; }
Retrieve Message instance from Session, the data should be in
serialize, so we need to unserialize it first.

@return static
Retrieve Message instance from Session the data should be in serialize so we need to unserialize it first .