1 | <?php |
||
14 | class Loader { |
||
|
|||
15 | private $requirements; |
||
16 | private $routes; |
||
17 | private $admin_routes; |
||
18 | |||
19 | /** |
||
20 | * Loader constructor. |
||
21 | */ |
||
22 | public function __construct() { |
||
27 | |||
28 | /** |
||
29 | * gets the page routes |
||
30 | * |
||
31 | * @return array of routes |
||
32 | */ |
||
33 | public function get_routes() { |
||
36 | |||
37 | /** |
||
38 | * gets the admin page routes |
||
39 | * |
||
40 | * @return array of routes |
||
41 | */ |
||
42 | public function get_admin_routes() { |
||
45 | |||
46 | /** |
||
47 | * returns the value of a setting |
||
48 | * |
||
49 | * @param string $setting |
||
50 | * @return mixed the value of the setting |
||
51 | */ |
||
52 | public function get_setting($setting) { |
||
55 | |||
56 | /** |
||
57 | * adds a requirement into the loader and registers it as a page with the router |
||
58 | * |
||
59 | * @param string $function php function name or class.class_name |
||
60 | * @param string $source php source file |
||
61 | * @param string $namespace optional php namespace |
||
62 | */ |
||
63 | public function add_page_requirement($function, $source, $namespace = '') { |
||
68 | |||
69 | /** |
||
70 | * adds a requirement into the loader and registers it as a page with the router |
||
71 | * |
||
72 | * @param string $function php function name or class.class_name |
||
73 | * @param string $source php source file |
||
74 | * @param string $namespace optional php namespace |
||
75 | */ |
||
76 | public function add_root_page_requirement($function, $source, $namespace = '') { |
||
80 | |||
81 | /** |
||
82 | * adds a requirement into the loader and registers it as a page with the router |
||
83 | * |
||
84 | * @param string $function php function name or class.class_name |
||
85 | * @param string $source php source file |
||
86 | * @param string $namespace optional php namespace |
||
87 | */ |
||
88 | public function add_ajax_page_requirement($function, $source, $namespace = '') { |
||
92 | |||
93 | /** |
||
94 | * adds a requirement into the loader and registers it as a page with the router |
||
95 | * |
||
96 | * @param string $function php function name or class.class_name |
||
97 | * @param string $source php source file |
||
98 | * @param string $namespace optional php namespace |
||
99 | */ |
||
100 | public function add_admin_page_requirement($function, $source, $namespace = '') { |
||
104 | |||
105 | /** |
||
106 | * adds a requirement into the loader |
||
107 | * |
||
108 | * @param string $function php function name or class.class_name |
||
109 | * @param string $source php source file |
||
110 | * @param string $namespace optional php namespace |
||
111 | */ |
||
112 | public function add_requirement($function, $source, $namespace = '') { |
||
115 | |||
116 | /** |
||
117 | * gets an array of requirements for loading |
||
118 | * |
||
119 | * @return array the array of requirements |
||
120 | */ |
||
121 | public function get_requirements() { |
||
124 | } |
||
125 | |||
126 |
This check marks property names that have not been written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes
databaseConnectionString
.