public function get_relationship($name, $strict = false) { if ($this->has_relationship($name)) { return $this->relationships[$name]; } if ($strict) { throw new RelationshipException("Relationship named {$name} has not been declared for class: {$this->class->getName()}"); } return null; }