/** * Returns class instance * * @return MAILBOX_BOL_FileUploadDao */ public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }
public function deleteUploadFile($hash, $userId) { $dto = $this->uploadFileDao->findUploadFile($hash, $userId); if ($dto === null) { return; } @unlink($dto->filePath); $this->uploadFileDao->deleteById($dto->id); }