public static function getEntity() { if (!static::$entity) { static::$entity = new StashDriverFactory(); } return static::$entity; }
/** * Creates the entity manager with the current settings * * @return EntityManager * @author Dan Cox */ public function create() { $config = Setup::createAnnotationMetadataConfiguration($this->modelDirectories, $this->development); static::$entity = EntityManager::create(['driver' => $this->config->params()->driver, 'user' => $this->config->params()->user, 'password' => $this->config->params()->pass, 'dbname' => $this->config->params()->database], $config); return static::$entity; }