本文整理匯總了PHP中Doo::acl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Doo::acl方法的具體用法?PHP Doo::acl怎麽用?PHP Doo::acl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Doo
的用法示例。
在下文中一共展示了Doo::acl方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: str_replace
$config['SUBFOLDER'] = str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\', '/', $config['SITE_PATH']));
if (strpos($config['SUBFOLDER'], '/') !== 0) {
$config['SUBFOLDER'] = '/' . $config['SUBFOLDER'];
}
$config['APP_URL'] = 'http://' . $_SERVER['HTTP_HOST'] . $config['SUBFOLDER'];
$config['DEBUG_ENABLED'] = FALSE;
$config['ERROR_404_ROUTE'] = '/404.htm';
$config['AUTOROUTE'] = true;
require_once $config['BASE_PATH'] . 'Doo.php';
require_once $config['BASE_PATH'] . 'app/DooConfig.php';
include PROJECT_ROOT . 'config/route.php';
if (file_exists(PROJECT_ROOT . 'config/db.php')) {
require_once PROJECT_ROOT . 'config/db.php';
} else {
require_once LUA_ROOT . ADMIN_ROOT . '/config/db.php';
}
if (file_exists(PROJECT_ROOT . 'config/acl.php')) {
require_once PROJECT_ROOT . 'config/acl.php';
} else {
require_once LUA_ROOT . ADMIN_ROOT . '/config/acl.php';
}
Doo::acl()->rules = $acl;
Doo::acl()->defaultFailedRoute = '/' . SYSNAME . '/401.htm';
Doo::conf()->set($config);
require_once $config['BASE_PATH'] . 'diagnostic/debug.php';
Doo::db()->setDb($dbconfig, $config['APP_MODE']);
Doo::db()->sql_tracking = true;
Doo::app()->route = $route;
Doo::loadClass('Lua', false, ADMIN_ROOT);
ob_start();
Doo::app()->run();
示例2: acl
/**
* Returns the Acl singleton, shorthand to Doo::acl()
* @return DooAcl
*/
public function acl()
{
return Doo::acl();
}
示例3:
<?php
include './protected/config/common.conf.php';
include './protected/config/routes.conf.php';
include './protected/config/db.conf.php';
include './protected/config/acl.conf.php';
#Just include this for production mode
//include $config['BASE_PATH'].'deployment/deploy.php';
include $config['BASE_PATH'] . 'Doo.php';
include $config['BASE_PATH'] . 'app/DooConfig.php';
Doo::conf()->set($config);
include $config['BASE_PATH'] . 'diagnostic/debug.php';
Doo::acl()->rules = $acl;
Doo::acl()->defaultFailedRoute = '/error';
Doo::db()->setDb($dbconfig, $config['APP_MODE']);
//Doo::db()->sql_tracking = true;
Doo::app()->route = $route;
Doo::app()->run();