本文整理汇总了PHP中Browser::printlogs方法的典型用法代码示例。如果您正苦于以下问题:PHP Browser::printlogs方法的具体用法?PHP Browser::printlogs怎么用?PHP Browser::printlogs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Browser
的用法示例。
在下文中一共展示了Browser::printlogs方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: invoke
public function invoke(User $user, $handlerName)
{
$user->validate();
include_once RUDRA . "/core/handler/AbstractHandler.php";
$handleCache = new RxCache("handlers", true);
global $temp;
$className;
if ($handleCache->hasKey($handlerName)) {
$classObj = $handleCache->get($handlerName);
include_once $classObj["filePath"];
$className = $classObj["className"];
} else {
$className = ucfirst($handlerName);
include_once HANDLER_PATH . "/" . $this->getHandlerPath() . $className . ".php";
}
$tempClass = new ReflectionClass($className);
if ($tempClass->isInstantiable()) {
$temp = $tempClass->newInstance();
}
if ($temp != NULL) {
if ($tempClass->hasMethod("invokeHandler")) {
$tpl = new Smarty();
// $tpl->prepare();
self::setSmartyPaths($tpl);
// $tpl->testInstall(); exit;
$tpl->debugging = Config::get('SMARTY_DEBUG');
$page = new Page();
$view = RudraX::invokeMethodByReflectionClass($tempClass, $temp, 'invokeHandler', array('tpl' => $tpl, 'viewModel' => $tpl, 'user' => $user, 'page' => $page, 'dataModel' => $page->data));
//$view = $temp->invokeHandler($tpl );
if (!isset($view)) {
$view = $handlerName;
}
$tpl->assign('user', $user);
$tpl->assign('CONTEXT_PATH', CONTEXT_PATH);
$tpl->assign('RESOURCE_PATH', Config::get('RESOURCE_PATH'));
if (isset($tpl->repeatData)) {
foreach ($tpl->repeatData as $key => $value) {
$tpl->assign($value['key'], $value['value']);
$tpl->display($this->getViewPath() . $view . Config::get('TEMP_EXT'));
}
} else {
$tpl->display($this->getViewPath() . $view . Config::get('TEMP_EXT'));
}
echo TEMP_DELIMITER;
if (BROWSER_LOGS) {
Browser::printlogs();
}
echo TEMP_DELIMITER . json_encode($page->data->data);
} else {
if ($tempClass->hasMethod("invoke")) {
$view = $temp->invoke();
if (!isset($view)) {
$view = $handlerName;
}
include $this->getViewPath() . $view . '.php';
}
}
}
}
示例2: rx_interceptor_page
function rx_interceptor_page($user, $info, $handlerName)
{
$user->validate();
include_once RUDRA . "/core/handler/AbstractHandler.php";
$handlerInfo = ClassUtil::getHandler($handlerName);
if ($handlerInfo != NULL) {
global $temp;
include_once $handlerInfo["filePath"];
$className = $handlerInfo["className"];
$tempClass = new ReflectionClass($className);
if ($tempClass->isInstantiable()) {
$temp = $tempClass->newInstance();
}
if ($temp != NULL) {
if ($tempClass->hasMethod("invokeHandler")) {
$tpl = new Smarty();
call_user_func(rx_function("rx_set_smarty_paths"), $tpl);
$tpl->debugging = RX_SMARTY_DEBUG;
$header = new Header($tpl);
$page = new Page();
$view = call_method_by_class($tempClass, $temp, 'invokeHandler', array('tpl' => $tpl, 'viewModel' => $tpl, 'user' => $user, 'header' => $header, 'page' => $page, 'dataModel' => $page->data, 'data' => new RequestData(get_request_param("data"))), $handlerInfo["requestParams"]);
if (!isset($view)) {
$view = $handlerName;
}
$tpl->assign('user', $user);
$tpl->assign('page', $page);
$tpl->assign('header', $header);
$tpl->assign('CONTEXT_PATH', CONTEXT_PATH);
$tpl->assign('RESOURCE_PATH', RESOURCE_PATH);
$tpl->assign('METAS', $header->metas);
$tpl->assign('TITLE', $header->title);
$view_path = $view . TEMP_EXT;
if (!file_exists($view_path)) {
$tpl->setTemplateDir(RUDRA . "/core/view");
//$view_path = get_include_path () . RUDRA . "/core/view/".$view.TEMP_EXT;
//$view_path = get_include_path () . RUDRA . "../view/".$view.TEMP_EXT;
}
$tpl->assign('BODY_FILES', $view_path);
$tpl->assign('page_json', json_encode($page->data->data));
$tpl->display(RUDRA . "/core/view/full.tpl");
Browser::log("header", $header->css, $header->scripts);
Browser::printlogs();
}
}
}
}
示例3: rx_interceptor_template
function rx_interceptor_template($user, $info, $handlerName)
{
$user->validate();
include_once RUDRA . "/core/handler/AbstractHandler.php";
$handlerInfo = ClassUtil::getHandler($handlerName);
if ($handlerInfo != NULL) {
global $temp;
include_once $handlerInfo["filePath"];
$className = $handlerInfo["className"];
$tempClass = new ReflectionClass($className);
if ($tempClass->isInstantiable()) {
$temp = $tempClass->newInstance();
}
if ($temp != NULL) {
if ($tempClass->hasMethod("invokeHandler")) {
$tpl = new Smarty();
call_user_func(rx_function("rx_set_smarty_paths"), $tpl);
$tpl->debugging = RX_SMARTY_DEBUG;
$page = new Page();
$view = call_method_by_class($tempClass, $temp, 'invokeHandler', array('tpl' => $tpl, 'viewModel' => $tpl, 'user' => $user, 'page' => $page, 'dataModel' => $page->data, 'data' => new RequestData(get_request_param("data"))), $handlerInfo["requestParams"]);
if (!isset($view)) {
$view = $handlerName;
}
$tpl->assign('user', $user);
$tpl->assign('CONTEXT_PATH', CONTEXT_PATH);
$tpl->assign('RESOURCE_PATH', RESOURCE_PATH);
if (isset($tpl->repeatData)) {
foreach ($tpl->repeatData as $key => $value) {
$tpl->assign($value['key'], $value['value']);
$tpl->display($this->getViewPath() . $view . Config::get('TEMP_EXT'));
}
} else {
$tpl->display($this->getViewPath() . $view . Config::get('TEMP_EXT'));
}
echo TEMP_DELIMITER;
Browser::printlogs();
echo TEMP_DELIMITER . json_encode($page->data->data);
Browser::printlogs();
}
}
}
}
示例4: rx_interceptor_page
function rx_interceptor_page($user, $controllerInfo, $params, $controllerExecute)
{
?>
<html>
<?
$tpl = new Smarty ();
$params["model"] = $tpl;
$header = new \app\model\Header ($tpl);
call_user_func(rx_function("rx_set_smarty_paths"), ($tpl));
$view = $controllerExecute($params);
$tpl->debugging = RX_SMARTY_DEBUG;
$tpl->assign('user', $user);
$tpl->assign('header', $header);
$tpl->assign('CONTEXT_PATH', CONTEXT_PATH);
$tpl->assign('METAS', $header->metas);
$tpl->assign('TITLE', $header->title);
?>
<head></head>
<body>
<?
$tpl->display($view_path = $view . TEMP_EXT);
?></body><?
Browser::log("header", $header->css, $header->scripts);
Browser::printlogs();
?></html><?
}