public function getEntity() { if (!is_object($this->configuration['entity'])) { $entity = $this->configuration['entity']; $this->configuration['entity'] = new $entity(); } return $this->configuration['entity']; }