/** * Constructor * * @param boolean $exists Whether the object exists in database or not. * If false a ID will be automatically choosen */ public function __construct($exists = false) { parent::__construct($exists); if ($exists == false) { $this->salt = sha1(uniqid(mt_rand(), true)); } }
/** * Delete the file from disk and database * * @return void */ public function delete() { $this->deleteFromDisk(); return parent::delete(); }
/** * Constructor * * @param boolean $exists Whether the object exists in database or not. * If false a ID will be automatically choosen */ public function __construct($exists = false) { parent::__construct($exists); }