public function getEntityById($id) { //var_dump($id); return isset($this->entitiesById[$id]) ? $this->entitiesById[$id] : null; }