コード例 #1
0
 /**
  * Validate a Order ID
  *
  * Verifies that the order exists.
  *
  * @param array $config Field configuration
  * @param string $data Field data
  * @return OrderDBO Order DBO for this Order ID
  * @throws RecordNotFoundException
  */
 public function validate($data)
 {
     $data = parent::validate($data);
     try {
         $orderDBO = load_OrderDBO(intval($data));
     } catch (DBNoRowsFoundException $e) {
         throw new RecordNotFoundException("Order");
     }
     return $orderDBO;
 }
コード例 #2
0
 /**
  * Get Order DBO
  *
  * @return OrderDBO The OrderDBO this item belongs to
  */
 public function getOrderDBO()
 {
     return load_OrderDBO($this->getOrderID());
 }