/** * Fetch PsyPlan's which this Overlegbasis references. * `overlegbasis`.`id` -> `psy_plan`.`overleg_id` * * @param PDO $db a PDO Database instance * @param array $sort array of DSC instances * @return PsyPlan[] */ public function fetchPsyPlanCollection(PDO $db, $sort = null) { $filter = array(PsyPlan::FIELD_OVERLEG_ID => $this->getId()); return PsyPlan::findByFilter($db, $filter, true, $sort); }
/** * get single PsyPlan instance from a DOMElement * * @param DOMElement $node * @return PsyPlan */ public static function fromDOMElement(DOMElement $node) { $o = new PsyPlan(); $o->assignByHash(self::domNodeToHash($node, self::$FIELD_NAMES, self::$DEFAULT_VALUES, self::$FIELD_TYPES)); $o->notifyPristine(); return $o; }
/** * Fetch PsyPlan which references this PsyPlanMens. Will return null in case reference is invalid. * `psy_plan_mens`.`plan` -> `psy_plan`.`id` * * @param PDO $db a PDO Database instance * @param array $sort array of DSC instances * @return PsyPlan */ public function fetchPsyPlan(PDO $db, $sort = null) { $filter = array(PsyPlan::FIELD_ID => $this->getPlan()); $result = PsyPlan::findByFilter($db, $filter, true, $sort); return empty($result) ? null : $result[0]; }