public function getState() { if (null === $this->state) { throw new NotLoadedException('The mapping is not loaded.'); } return $this->state; }