Exemplo n.º 1
0
 /**
  * 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));
     }
 }
Exemplo n.º 2
0
 /**
  * Delete the file from disk and database
  * 
  * @return void
  */
 public function delete()
 {
     $this->deleteFromDisk();
     return parent::delete();
 }
Exemplo n.º 3
0
 /**
  * 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);
 }