/** * Ensures that this Configuration instance contains settings that are * suitable for a production environment. * * @return void * * @throws ORMException If a configuration setting has a value that is not * suitable for a production environment. */ public function ensureProductionSettings() { $queryCacheImpl = $this->getQueryCacheImpl(); if (!$queryCacheImpl) { throw ORMException::queryCacheNotConfigured(); } if ($queryCacheImpl instanceof ArrayCache) { throw ORMException::queryCacheUsesNonPersistentCache($queryCacheImpl); } $metadataCacheImpl = $this->getMetadataCacheImpl(); if (!$metadataCacheImpl) { throw ORMException::metadataCacheNotConfigured(); } if ($metadataCacheImpl instanceof ArrayCache) { throw ORMException::metadataCacheUsesNonPersistentCache($metadataCacheImpl); } if ($this->getAutoGenerateProxyClasses()) { throw ORMException::proxyClassesAlwaysRegenerating(); } }
/** * Ensures that this Configuration instance contains settings that are * suitable for a production environment. * * @throws ORMException If a configuration setting has a value that is not * suitable for a production environment. */ public function ensureProductionSettings() { if (!$this->getQueryCacheImpl()) { throw ORMException::queryCacheNotConfigured(); } if (!$this->getMetadataCacheImpl()) { throw ORMException::metadataCacheNotConfigured(); } if ($this->getAutoGenerateProxyClasses()) { throw ORMException::proxyClassesAlwaysRegenerating(); } }
/** * Ensures that this Configuration instance contains settings that are * suitable for a production environment. * * @throws ORMException If a configuration setting has a value that is not * suitable for a production environment. */ public function ensureProductionSettings() { if (!$this->_attributes['queryCacheImpl']) { throw ORMException::queryCacheNotConfigured(); } if (!$this->_attributes['metadataCacheImpl']) { throw ORMException::metadataCacheNotConfigured(); } if ($this->_attributes['autoGenerateProxyClasses']) { throw ORMException::proxyClassesAlwaysRegenerating(); } }