public function __get($property) { $association = $this->_associations->get($property); if (!$association) { throw new RuntimeException(sprintf('Table "%s" is not associated with "%s"', get_class($this), $property)); } return $association; }