本文整理汇总了PHP中Options::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Options::load方法的具体用法?PHP Options::load怎么用?PHP Options::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Options
的用法示例。
在下文中一共展示了Options::load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: modifyAction
public function modifyAction()
{
$app = App::getInstance();
$id = (int) $app->getUrlParam('id');
$item = Options::load($id);
$app->render(['title' => _('Edit Setting'), 'item' => $item]);
}
示例2: define
*/
if (!defined('LANGDIR')) {
define('LANGDIR', '/content/locales');
}
//Settings that use other settings variables
if (!defined('LILINA_CONTENT_DIR')) {
define('LILINA_CONTENT_DIR', LILINA_PATH . '/content');
}
if (!defined('LILINA_CACHE_DIR')) {
define('LILINA_CACHE_DIR', LILINA_CONTENT_DIR . '/system/cache/');
}
if (!defined('LILINA_DATA_DIR')) {
define('LILINA_DATA_DIR', LILINA_CONTENT_DIR . '/system/data/');
}
}
/**
* Attempt to load the class before PHP fails with an error.
*
* This method is called automatically in case you are trying to use a class which hasn't been defined yet.
* @param string $class_name Class called by the user
*/
function __autoload($class_name)
{
$class_file = strtolower($class_name) . '.php';
if (file_exists(LILINA_INCPATH . '/core/class-' . $class_file)) {
require_once LILINA_INCPATH . '/core/class-' . $class_file;
}
}
spl_autoload_register('__autoload');
Options::load();