コード例 #1
0
 /**
  * Fetch Evalinstr which references this Overlegbasis. Will return null in case reference is invalid.
  * `overlegbasis`.`evalinstr_id` -> `evalinstr`.`ei_id`
  *
  * @param PDO $db a PDO Database instance
  * @param array $sort array of DSC instances
  * @return Evalinstr
  */
 public function fetchEvalinstr(PDO $db, $sort = null)
 {
     $filter = array(Evalinstr::FIELD_EI_ID => $this->getEvalinstrId());
     $result = Evalinstr::findByFilter($db, $filter, true, $sort);
     return empty($result) ? null : $result[0];
 }
コード例 #2
0
 /**
  * get single Evalinstr instance from a DOMElement
  *
  * @param DOMElement $node
  * @return Evalinstr
  */
 public static function fromDOMElement(DOMElement $node)
 {
     $o = new Evalinstr();
     $o->assignByHash(self::domNodeToHash($node, self::$FIELD_NAMES, self::$DEFAULT_VALUES, self::$FIELD_TYPES));
     $o->notifyPristine();
     return $o;
 }