本文整理匯總了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();