本文整理汇总了PHP中Settings::settings方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::settings方法的具体用法?PHP Settings::settings怎么用?PHP Settings::settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings
的用法示例。
在下文中一共展示了Settings::settings方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: LoadSettings
/**
* Load site settings from DB into memory
*/
public static function LoadSettings()
{
self::$settings = new stdClass();
// Retrieve all settings from DB and store in object
$db = Database::GetInstance();
$query = "SELECT * FROM " . DB_PREFIX . self::$table;
$result = $db->Query($query);
while ($row = $db->FetchObj($result)) {
$field = $row->name;
self::$settings->{$field} = $row->value;
}
}
示例2: footer
/**
* Footer
*
*/
function footer()
{
$Settings = new Settings();
$settings = $Settings->settings();
echo $settings['system_name'];
}
示例3: clear
public static function clear()
{
self::$settings = [];
}
示例4: setAll
public static function setAll($settings_array)
{
if (is_array($settings_array)) {
self::$settings = $settings_array;
}
}
示例5: Create
private function Create()
{
if (!self::$settings) {
self::$settings = array();
self::$settings['LOG_FILE'] = 'log.txt';
}
}
示例6: load
static function load()
{
Output::d(self::class_name . "settings.xml found");
self::$settings = self::xml2array(file_get_contents(getcwd() . "/settings.xml"));
}
示例7: loadSettings
public static function loadSettings()
{
$string = file_get_contents(ROOT . 'settings.json');
self::$settings = json_decode($string);
self::initDefaultSettings();
}