本文整理汇总了PHP中Doctrine\ORM\ORMException::queryCacheNotConfigured方法的典型用法代码示例。如果您正苦于以下问题:PHP ORMException::queryCacheNotConfigured方法的具体用法?PHP ORMException::queryCacheNotConfigured怎么用?PHP ORMException::queryCacheNotConfigured使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine\ORM\ORMException
的用法示例。
在下文中一共展示了ORMException::queryCacheNotConfigured方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ensureProductionSettings
/**
* 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();
}
}
示例2: ensureProductionSettings
/**
* 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();
}
}
开发者ID:MarS2806,项目名称:Zend-Framework--Doctrine-ORM--PHPUnit--Ant--Jenkins-CI--TDD-,代码行数:19,代码来源:Configuration.php
示例3: ensureProductionSettings
/**
* 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();
}
}