本文整理匯總了PHP中Home::show方法的典型用法代碼示例。如果您正苦於以下問題:PHP Home::show方法的具體用法?PHP Home::show怎麽用?PHP Home::show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Home
的用法示例。
在下文中一共展示了Home::show方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: run
public static function run($url)
{
if (!empty($url) && strtolower($url) != "home") {
$url = explode("/", $url);
$class = ucfirst(strtolower($url[0]));
if (count($url) > 1) {
$method = $url[1] ? strtolower($url[1]) : null;
if (count($url) > 2) {
$param = $url[2] ? $url[2] : null;
}
}
if (file_exists(DIR_CONTROLLER . $class . '.php')) {
$obj = new $class();
if (isset($method) && method_exists($obj, $method)) {
if (isset($param)) {
$obj->{$method}($param);
} else {
$obj->{$method}();
}
} else {
if (isset($method)) {
include DIR_BASE . 'app/view/erro500.php';
}
}
$obj->show();
} else {
include DIR_BASE . 'app/view/erro500.php';
}
} else {
$obj = new Home();
$obj->show();
}
}
示例2: Workunit
break;
case 'workunit':
$workunit = new Workunit();
$workunit->show();
break;
case 'workorders':
$workorders = new Workorders();
$workorders->show();
break;
case 'workorder':
$workorder = new Workorder();
$workorder->show();
break;
case 'incidents':
$incidents = new Incidents();
$incidents->show();
break;
case 'incident':
$incident = new Incident();
$incident->show();
break;
case 'calendars':
$calendars = new Calendars();
$calendars->show();
break;
default:
$home = new Home();
$home->show();
}
break;
}
示例3: showNoPermission
private function showNoPermission()
{
$system = System::getInstance();
audit_db($system->getConfig('id_user'), $REMOTE_ADDR, "ACL Violation", "Trying to access to workorder section");
$error['title_text'] = __('You don\'t have access to this page');
$error['content_text'] = __('Access to this page is restricted to
authorized users only, please contact to system administrator
if you need assistance. <br><br>Please know that all attempts
to access this page are recorded in security logs of Integria
System Database');
$home = new Home();
$home->show($error);
}
示例4: Role
$role = new Role();
$leave = new LeaveController($bag);
// $route->respond( function () use($home){
// return 'Middleware should be first palce';
// });
$route->respond('GET', '/', function () use($home) {
return $home->index();
});
$route->respond('GET', '/test', function () use($user, $role) {
$users = $user->all();
foreach ($users as $user) {
var_dump($user->role->permission);
}
});
$route->respond('GET', '/show/[i:id]', function ($request) use($home) {
return $home->show($request);
});
$route->respond('GET', '/create', function () use($home) {
return $home->create();
});
$route->respond('POST', '/store', function ($request, $response) use($home) {
return $home->store($request, $response);
});
$route->respond('GET', '/login', function () use($home) {
echo $home->getLogin();
unset($_SESSION['flash']);
});
$route->respond('POST', '/login', function ($request, $response, $service) use($home) {
return $home->postLogin($request, $response, $service);
});
$route->respond('GET', '/logout', function ($request, $response, $service) use($home) {