本文整理汇总了PHP中Get::page方法的典型用法代码示例。如果您正苦于以下问题:PHP Get::page方法的具体用法?PHP Get::page怎么用?PHP Get::page使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Get
的用法示例。
在下文中一共展示了Get::page方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
$x = intval(($xi - $xr) / 2);
$y = intval(($yi + $yr) / 2);
imagettftext($image, $size, 0, $x, $y, $color, $font, $text);
imagepng($image);
imagedestroy($image);
exit;
}, 90);
/**
* Static Page
* -----------
*
* [1]. page-slug
*
*/
Route::accept('(:any)', function ($slug = "") use($config) {
if (!($page = Get::page($slug))) {
Shield::abort('404-page');
}
if ($page->state === 'drafted') {
Shield::abort('404-page');
}
if (isset($_GET['repair']) && Guardian::happy()) {
Guardian::kick($config->manager->slug . '/page/repair/id:' . $page->id);
}
Filter::add('pager:url', function ($url) {
return Filter::apply('page:url', $url);
});
Config::set(array('page_title' => $page->title . $config->title_separator . $config->title, 'page' => $page));
Weapon::add('shell_after', function () use($page) {
if (isset($page->css) && trim($page->css) !== "") {
echo O_BEGIN . $page->css . O_END;
示例2: array
Weapon::fire('on_page_repair', array($G, $P));
Guardian::kick($config->manager->slug . '/page/repair/id:' . Date::format($date, 'U'));
}
}
}
Weapon::add('SHIPMENT_REGION_BOTTOM', function () {
echo Asset::javascript('manager/assets/sword/editor.compose.js', "", 'sword/editor.compose.min.js');
}, 11);
Shield::lot(array('segment' => 'page', 'default' => $page))->attach('manager', false);
});
/**
* Page Killer
* -----------
*/
Route::accept($config->manager->slug . '/page/kill/id:(:num)', function ($id = "") use($config, $speak) {
if (!($page = Get::page($id, array('comments')))) {
Shield::abort();
}
if (Guardian::get('status') !== 'pilot' && Guardian::get('author') !== $page->author) {
Shield::abort();
}
Config::set(array('page_title' => $speak->deleting . ': ' . $page->title . $config->title_separator . $config->manager->title, 'page' => $page, 'cargo' => DECK . DS . 'workers' . DS . 'kill.page.php'));
$G = array('data' => Mecha::A($page));
if ($request = Request::post()) {
Guardian::checkToken($request['token']);
File::open($page->path)->delete();
$task_connect = $page;
$P = array('data' => $request);
include DECK . DS . 'workers' . DS . 'task.field.3.php';
include DECK . DS . 'workers' . DS . 'task.custom.3.php';
Notify::success(Config::speak('notify_success_deleted', $page->title));