storagePath = $storagePath; $this->$expireDays = $expireDays; $this->$maxDownloads = $maxDownloads; $this->$tokenLength = $tokenLength; } // generate a new token and save it to the file system public generateToken( string $filename, string $ownerName, string $allowedUser ) { return (['error'=>'no token generated', 'status'=>'500']); } // retrieve/download the key file connected with the token public retrieveToken(string $tokenName) { } // check a token and remove it when it's expired public cleanupToken(string $tokenName) { } /* * PRIVATE FUNCTIONS */ // check whether a token is still valid and accessible by the user requesting it private validateToken($tokenName) { return null; } private getDownloadFileInfo ($tokenName) { $fileInfo = []; return null; } }