foreignID = $id; $this->dataQuery->filter($this->foreignIDFilter()); } /** * Returns this ManyMany relationship linked to the given foreign ID. * @param $id An ID or an array of IDs. */ function forForeignID($id) { $this->setForeignID($id); return $this; } abstract protected function foreignIDFilter(); }