예제 #1
0
파일: User.php 프로젝트: mtornero/slowshop
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aFile) {
         $this->aFile->removeUser($this);
     }
     if (null !== $this->aRole) {
         $this->aRole->removeUser($this);
     }
     if (null !== $this->aResource) {
         $this->aResource->removeUser($this);
     }
     $this->user_id = null;
     $this->resource_id = null;
     $this->user_name = null;
     $this->user_surname = null;
     $this->user_login = null;
     $this->user_pass = null;
     $this->user_pass_is_temp = null;
     $this->remember_token = null;
     $this->user_email = null;
     $this->user_phone = null;
     $this->user_address = null;
     $this->role_id = null;
     $this->user_is_validated = null;
     $this->user_is_active = null;
     $this->user_pic = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }