示例#1
0
 /**
  * Loads the SummerApplication object with the corresponding id. Requires that $this->id be non-zero.
  */
 protected function load()
 {
     if ($this->id == 0) {
         return;
     }
     # Load the core application data using the parent class
     if (!parent::load()) {
         return false;
     }
     # Load the application-specific data
     $db = new PHPWS_DB('hms_summer_application');
     if (PHPWS_Error::logIfError($db->loadObject($this))) {
         $this->id = 0;
         return false;
     }
     return true;
 }
示例#2
0
 /**
  * Loads the LotteryApplication object with the corresponding id. Requires that $this->id be non-zero.
  */
 protected function load()
 {
     if ($this->id == 0) {
         return;
     }
     # Load the core application data using the parent class
     if (!parent::load()) {
         return false;
     }
     # Load the application-specific data
     $db = new PHPWS_DB('hms_lottery_application');
     if (PHPWS_Error::logIfError($db->loadObject($this))) {
         $this->id = 0;
         throw new DatabaseException($result->toString());
     }
     return true;
 }