/** * Fetch Equipes which references this ManchesEquipes. Will return null in case reference is invalid. * `manches_equipes`.`id_equipe` -> `equipes`.`id_equipes` * * @param PDO $db a PDO Database instance * @param array $sort array of DSC instances * @return Equipes */ public function fetchEquipes(PDO $db, $sort = null) { $filter = array(Equipes::FIELD_ID_EQUIPES => $this->getIdEquipe()); $result = Equipes::findByFilter($db, $filter, true, $sort); return empty($result) ? null : $result[0]; }
/** * get single Equipes instance from a DOMElement * * @param DOMElement $node * @return Equipes */ public static function fromDOMElement(DOMElement $node) { $o = new Equipes(); $o->assignByHash(self::domNodeToHash($node, self::$FIELD_NAMES, self::$DEFAULT_VALUES, self::$FIELD_TYPES)); $o->notifyPristine(); return $o; }