本文整理汇总了PHP中RedBeanDatabase::isSetup方法的典型用法代码示例。如果您正苦于以下问题:PHP RedBeanDatabase::isSetup方法的具体用法?PHP RedBeanDatabase::isSetup怎么用?PHP RedBeanDatabase::isSetup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RedBeanDatabase
的用法示例。
在下文中一共展示了RedBeanDatabase::isSetup方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: closeDatabaseConnection
protected static function closeDatabaseConnection()
{
if (RedBeanDatabase::isSetup()) {
RedBeanDatabase::close();
assert('!RedBeanDatabase::isSetup()');
}
}
示例2: setByModuleName
/**
* Set a global configuration value by module name and key
*/
public static function setByModuleName($moduleName, $key, $value)
{
assert('is_string($moduleName)');
assert('is_string($key)');
if (!RedBeanDatabase::isSetup()) {
return null;
}
$metadata = $moduleName::getMetadata();
$metadata['global'][$key] = $value;
static::cacheValue($moduleName, $key, $value);
$moduleName::setMetadata($metadata);
}
示例3: close
public static function close()
{
// TODO - find out if there is a proper way.
ZurmoRedBean::$toolboxes = array();
ZurmoRedBean::$toolbox = null;
ZurmoRedBean::$redbean = null;
ZurmoRedBean::$writer = null;
ZurmoRedBean::$adapter = null;
ZurmoRedBean::$associationManager = null;
ZurmoRedBean::$extAssocManager = null;
ZurmoRedBean::$exporter = null;
ZurmoRedBean::$tagManager = null;
ZurmoRedBean::$currentDB = '';
ZurmoRedBean::$f = null;
ZurmoRedBean::close();
self::$isSetup = false;
}
示例4: save
/**
* Saves application state in persistent storage(database).
* @param mixed $state state data (must be serializable).
*/
public function save($state)
{
if (RedBeanDatabase::isSetup()) {
ZurmoConfigurationUtil::setByModuleName('ZurmoModule', 'globalState', serialize($state));
}
}