本文整理汇总了PHP中Lobby::doHook方法的典型用法代码示例。如果您正苦于以下问题:PHP Lobby::doHook方法的具体用法?PHP Lobby::doHook怎么用?PHP Lobby::doHook使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lobby
的用法示例。
在下文中一共展示了Lobby::doHook方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dispatch
public static function dispatch()
{
self::defaults();
\Lobby::doHook("router.finish");
self::statusRoutes();
self::$router->dispatch();
}
示例2: ser
<?php
require "../load.php";
?>
<!DOCTYPE html>
<html>
<head>
<?php
\Lobby::doHook("admin.head.begin");
\Lobby::head("Install App");
//~
?>
</head>
<body>
<?php
\Lobby::doHook("admin.body.begin");
?>
<div class="workspace">
<div class="contents">
<?php
if (H::input("id") == null) {
ser("Error", "No App is mentioned. Install Apps from <a href='lobby-store.php'>Lobby Store</a>");
}
if (H::input("action") == "enable" && H::csrf()) {
$App = new \Lobby\Apps($_GET['id']);
if (!$App->exists) {
ser("Error", "App is not installed");
}
$App->enableApp();
sss("Enabled", "The App <b>{$_GET['id']}</b> is enabled. The author says thanks.<a href='" . $App->info['URL'] . "' class='button green'>Open App</a>");
}
示例3:
require_once L_DIR . "/includes/src/Database.php";
/* The Database Class */
require_once L_DIR . "/includes/src/Query.php";
/* The Database Class */
require_once L_DIR . "/includes/src/Apps.php";
/* The App Class */
require_once L_DIR . "/includes/src/Router.php";
/* The Router Class */
require_once L_DIR . "/includes/src/Server.php";
/* The File System Class */
require_once L_DIR . "/includes/functions.php";
/* Non class functions */
require_once L_DIR . "/includes/extra.php";
/* Define extra variables or constants */
/**
* Run not on CDN files serving
*/
if (!\Lobby::status("lobby.serve")) {
/**
* Init the page setup
*/
require_once L_DIR . "/includes/init.php";
/**
* Is Lobby Installed ?
*/
if (!\Lobby::$installed && !\Lobby::status("lobby.install")) {
\Lobby::redirect("/admin/install.php");
}
}
\Lobby::doHook("init");
示例4:
?>
<script>
window.tmp = {};window.lobbyExtra = {};<?php
if (isset($AppID)) {
echo 'lobbyExtra["app"] = { id: "' . $AppID . '", url: "' . APP_URL . '", src: "' . \Lobby::u("/contents/apps/{$AppID}") . '" };';
}
?>
</script>
<?php
\Lobby::head();
\Lobby::doHook("head.end");
?>
</head>
<body>
<?php
\Lobby::doHook("body.begin");
?>
<div class="workspace" <?php
if (isset($AppID)) {
echo 'id="' . $AppID . '"';
}
?>
>
<?php
if (is_array($GLOBALS['workspaceHTML'])) {
$fileLoc = $GLOBALS['workspaceHTML'][0];
include L_DIR . $fileLoc;
} else {
echo $GLOBALS['workspaceHTML'];
}
?>