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