protected function getSessionData(string $key)
    {
        if (method_exists($this->getSession(), 'get')) {
            return $this->getSession()->get($key);
        } elseif (method_exists($this->getSession(), 'read')) {
            return $this->getSession()->read($key);
        }

        return false;
    }
protected function getSessionData(string $key)
    {
        if (method_exists($this->getSession(), 'get')) {
            return $this->getSession()->get($key);
        } elseif (method_exists($this->getSession(), 'read')) {
            return $this->getSession()->read($key);
        }

        return false;
    }
protected function getSessionData ( string $ key ) { if ( method_exists ( $ this -> getSession ( ) , 'get' ) ) { return $ this -> getSession ( ) -> get ( $ key ) ; } elseif ( method_exists ( $ this -> getSession ( ) , 'read' ) ) { return $ this -> getSession ( ) -> read ( $ key ) ; } return false ; }
Get Session data

@param string $key
@return bool|mixed
Get Session data