scheme; } /** * @param string $scheme * @return $this */ public function setScheme($scheme) { $this->scheme = $scheme; return $this; } /** * Serialize into JSON for client-side JS */ public function jsonSerialize(): array { $data = $this->jsonSerializeDefinition(); $data += $this->jsonSerializeIdentifier(); $data['scheme'] = $this->getScheme(); $data['visibility'] = $this->getVisibility(); return $data; } /** * Check if parameters are satisfied in a StorageConfig * * @param StorageConfig $storage * @return bool */ public function validateStorage(StorageConfig $storage) { // does the backend actually support this scheme $supportedSchemes = $storage->getBackend()->getAuthSchemes(); if (!isset($supportedSchemes[$this->getScheme()])) { return false; } return $this->validateStorageDefinition($storage); } }