本文整理汇总了PHP中_root::getLog方法的典型用法代码示例。如果您正苦于以下问题:PHP _root::getLog方法的具体用法?PHP _root::getLog怎么用?PHP _root::getLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类_root
的用法示例。
在下文中一共展示了_root::getLog方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: can
/**
* @access public
* @return bool retourne true/false selon qu'on est autorise ou non a faire $action sur $ressource
* @param string $action action qu'on autorise sur $ressource
* @param string $ressource ressource l'action est autorise sur $ressource
*/
public function can($action, $ressource)
{
$ok = true;
if (!isset($this->tabAllowDeny[$ressource])) {
$ok = false;
}
if (!isset($this->tabAllowDeny[$ressource][$action])) {
$ok = false;
}
if (_root::getConfigVar('site.mode') == 'dev') {
$tAskCan = _root::getConfigVar('tAskCan');
$tAskCan[] = array($action, $ressource, $ok);
_root::setConfigVar('tAskCan', $tAskCan);
}
if ($ok) {
$sOk = 'oui';
} else {
$sOk = 'non';
}
_root::getLog()->info('ACL can "' . $action . '" on "' . $ressource . '" ? : ' . $sOk);
return $ok;
}
示例2: delete
/**
* supprime un enregistrement
* @access public
* @param object $oRow
*/
public function delete($oRow)
{
$this->getSgbd()->delete($this->sTable, $oRow->getWhere());
/*LOG*/
_root::getLog()->info('sql delete:' . $this->getSgbd()->getRequete());
}
示例3: parseUrl
/**
* parse l'url rewrite pour en extraire les parametres (nav, parametres...)
* @access public
* @param string $sUrl url
*/
public function parseUrl($sUrl)
{
$sRootScript = $_SERVER['SCRIPT_NAME'];
$sRootScript = str_replace(_root::getConfigVar('navigation.scriptname'), '', $sRootScript);
$sUrl = str_replace($sRootScript, '', $sUrl);
/*LOG*/
_root::getLog()->info('plugin_routing parseUrl(' . $sUrl . ')');
if (is_array($this->tRoute)) {
foreach ($this->tRoute as $sPattern => $tUrl) {
$sPattern = preg_replace('/:([^:])*:/', '([^/]*)', $sPattern);
$sPattern = preg_replace('/\\//', '\\/', $sPattern);
if (preg_match_all('/^' . $sPattern . '$/', $sUrl, $tTrouve)) {
_root::getRequest()->loadModuleAndAction($tUrl['nav']);
if (isset($tUrl['tParam']) and is_array($tTrouve[1])) {
$j = 0;
foreach ($tTrouve as $i => $found) {
if ($i == 0) {
continue;
}
$j = $i - 1;
_root::setParam($tUrl['tParam'][$j], $found[0]);
}
}
if (isset($tUrl['tParamHidden'])) {
foreach ($tUrl['tParamHidden'] as $key => $val) {
_root::setParam($key, $val);
}
}
return;
}
}
/*LOG*/
_root::getLog()->info('plugin_routing regle non trouve,
utilisation de 404 loadModuleAndAction(' . $this->tRoute['404']['nav'] . ')');
if (_root::getConfigVar('urlrewriting.use4O4') == 1) {
_root::getRequest()->loadModuleAndAction($this->tRoute['404']['nav']);
}
}
}
示例4: load
/**
* retourne le contenu d'un objet _tpl a l'emplacement $sPlace
* @access public
* @return string
* @param string $sPlace
*/
public function load($sPlace)
{
/*LOG*/
_root::getLog()->info('-layout: chargement/affichage place [' . $sPlace . ']');
if (!isset($this->_tContent[$sPlace])) {
return null;
}
$sLoad = '';
foreach ($this->_tContent[$sPlace] as $oTpl) {
$sLoad .= $oTpl->show();
}
return $sLoad;
}
示例5: choose
protected function choose($sPath)
{
if (!file_exists($sPath) and !file_exists($sPath . _root::getConfigVar('template.extension'))) {
/*LOG*/
_root::getLog()->error('vue ' . $sPath . ' et inexistant');
throw new Exception('vue ' . $sPath . ' et ' . $sPath . _root::getConfigVar('template.extension') . ' inexistant');
}
$this->_sPath = $sPath;
}