code: public function save()
      {
          $storage = $this->getStorage();
          if ($storage) {
              $success = $storage->set($this->userId, $this->getStorageKey(), json_encode($this->state));
          } else {
              $success = false;
          }
          return $success;
      }
docs: Saves the extended state into the storage
  @return bool