-
Notifications
You must be signed in to change notification settings - Fork 0
/
handler.php
51 lines (35 loc) · 1.18 KB
/
handler.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
This is the Filmmakers for Future handler.
This file contains the Filmmakers for Future handler.
@package filmmakers4future\fm4fhandler
@version 0.1a4
@author Yahe <[email protected]>
@since 0.1a0
*/
// ===== DO NOT EDIT HERE =====
// prevent script from getting called directly
if (!defined("URLAUBE")) { die(""); }
class FM4FHandler {
// HANDLER FUNCTIONS
public static function index() {
$result = false;
// retrieve the index page content
$content = callcontent(value(Main::class, URI)."index", false, false, null);
if (null !== $content) {
// set the content to be processed by plugins and the theme
Main::set(CONTENT, $content);
Main::set(METADATA, new Content());
// handle pagination if the PAGE metadate is supported
Main::set(PAGE, 1);
Main::set(PAGECOUNT, 1);
// transfer the handling to the Themes class
Themes::run();
// we handled this page
$result = true;
}
return $result;
}
}
// register handler
Handlers::register(FM4FHandler::class, "index", "~^\/[a-zA-Z]{2}\/$~", [GET, POST], ADDSLASH);