예제 #1
0
 /**
  * Validate a Server ID
  *
  * Verifies that the server exists.
  *
  * @param string $data Field data
  * @return ServerDBO Server DBO for this Server ID
  * @throws RecordNotFoundException
  */
 public function validate($data)
 {
     $data = parent::validate($data);
     try {
         $serverDBO = load_ServerDBO(intval($data));
     } catch (DBNoRowsFoundException $e) {
         throw new RecordNotFoundException("Server");
     }
     return $serverDBO;
 }
 /**
  * Set Server ID
  *
  * @param integer $id Server ID
  */
 public function setServerID($id)
 {
     $id = intval($id);
     if ($id < 1) {
         // Not assigned to a server
         $serverid = null;
         $serverdbo = null;
         return;
     }
     $this->serverid = $id;
     $this->serverdbo = load_ServerDBO($id);
 }
예제 #3
0
 /**
  * Set Server ID
  *
  * Set the Server that owns this IP address
  *
  * @param integer $id Server ID
  */
 function setServerID($id)
 {
     $this->serverdbo = load_ServerDBO($id);
     $this->serverid = $id;
 }