setTitle(trim($data['title'])); } if (isset($data['type'])) { $this->setType($data['type']); } $this->setCipher(isset($data['cipher']) && $data['cipher'] === 'yes'); return $this; } public function generateFilename() { $this->setFile(uniqid()); } }