principalInfo['uri']); return $name; } /** * @return never */ public function setName($name): never { throw new Forbidden('Permission denied to rename this folder'); } public function createFile($name, $data = null): never { throw new Forbidden('Not allowed to create files in this folder'); } /** * @return never */ public function createDirectory($name): never { throw new Forbidden('Permission denied to create folders in this folder'); } public function getChild($name) { return match ($name) { AlbumsHome::NAME => new AlbumsHome($this->principalInfo, $this->albumMapper, $this->userId, $this->rootFolder, $this->userConfigService, $this->logger, $this->userManager), SharedAlbumsHome::NAME => new SharedAlbumsHome($this->principalInfo, $this->albumMapper, $this->userId, $this->rootFolder, $this->userManager, $this->groupManager, $this->userConfigService, $this->logger), PlacesHome::NAME => new PlacesHome($this->userId, $this->rootFolder, $this->reverseGeoCoderService, $this->placeMapper), default => throw new NotFound(), }; } /** * @return (AlbumsHome|SharedAlbumsHome|PlacesHome)[] */ public function getChildren(): array { return [ new AlbumsHome($this->principalInfo, $this->albumMapper, $this->userId, $this->rootFolder, $this->userConfigService, $this->logger, $this->userManager), new SharedAlbumsHome($this->principalInfo, $this->albumMapper, $this->userId, $this->rootFolder, $this->userManager, $this->groupManager, $this->userConfigService, $this->logger), new PlacesHome($this->userId, $this->rootFolder, $this->reverseGeoCoderService, $this->placeMapper), ]; } public function childExists($name): bool { return $name === AlbumsHome::NAME || $name === SharedAlbumsHome::NAME || $name === PlacesHome::NAME; } public function getLastModified(): int { return 0; } }