principalInfo['uri']); return $name; } public function setName($name) { throw new Forbidden('Permission denied to rename this trashbin'); } public function createFile($name, $data = null) { throw new Forbidden('Not allowed to create files in the trashbin'); } public function createDirectory($name) { throw new Forbidden('Not allowed to create folders in the trashbin'); } public function getChild($name) { if ($name === 'restore') { return new RestoreFolder(); } if ($name === 'trash') { return new TrashRoot($this->user, $this->trashManager); } throw new NotFound(); } public function getChildren(): array { return [ new RestoreFolder(), new TrashRoot($this->user, $this->trashManager) ]; } public function childExists($name): bool { return $name === 'restore' || $name === 'trash'; } public function getLastModified(): int { return 0; } }