1 | <?php |
||
14 | class Loader { |
||
15 | protected $requirements; |
||
16 | protected $routes; |
||
17 | protected $admin_routes; |
||
18 | protected $public_routes; |
||
19 | |||
20 | /** |
||
21 | * Loader constructor. |
||
22 | */ |
||
23 | public function __construct() { |
||
29 | |||
30 | /** |
||
31 | * gets the page routes |
||
32 | * |
||
33 | * @param bool $include_admin |
||
34 | * @return array of routes |
||
35 | */ |
||
36 | public function get_routes($include_admin = FALSE) { |
||
53 | |||
54 | /** |
||
55 | * gets the admin page routes |
||
56 | * |
||
57 | * @return array of routes |
||
58 | */ |
||
59 | public function get_admin_routes() { |
||
62 | |||
63 | /** |
||
64 | * gets the public page routes |
||
65 | * |
||
66 | * @return array of routes |
||
67 | */ |
||
68 | public function get_public_routes() { |
||
71 | |||
72 | /** |
||
73 | * returns the value of a setting |
||
74 | * |
||
75 | * @param string $setting |
||
76 | * @return mixed the value of the setting |
||
77 | */ |
||
78 | public function get_setting($setting) { |
||
81 | |||
82 | /** |
||
83 | * adds a requirement into the loader and registers it as a page with the router |
||
84 | * |
||
85 | * @param string $function php function name or class.class_name |
||
86 | * @param string $source php source file |
||
87 | * @param string $namespace optional php namespace |
||
88 | */ |
||
89 | public function add_page_requirement($function, $source, $namespace = '') { |
||
94 | |||
95 | /** |
||
96 | * adds a requirement into the loader and registers it as a page with the router |
||
97 | * |
||
98 | * @param string $function php function name or class.class_name |
||
99 | * @param string $source php source file |
||
100 | * @param string $namespace optional php namespace |
||
101 | */ |
||
102 | public function add_root_page_requirement($function, $source, $namespace = '') { |
||
106 | |||
107 | /** |
||
108 | * adds a requirement into the loader and registers it as a page with the router |
||
109 | * |
||
110 | * @param string $function php function name or class.class_name |
||
111 | * @param string $path source file path |
||
112 | */ |
||
113 | public function add_public_path($page, $source) { |
||
116 | |||
117 | /** |
||
118 | * adds a requirement into the loader and registers it as a page with the router |
||
119 | * |
||
120 | * @param string $function php function name or class.class_name |
||
121 | * @param string $source php source file |
||
122 | * @param string $namespace optional php namespace |
||
123 | */ |
||
124 | public function add_ajax_page_requirement($function, $source, $namespace = '') { |
||
128 | |||
129 | /** |
||
130 | * adds a requirement into the loader and registers it as a page with the router |
||
131 | * |
||
132 | * @param string $function php function name or class.class_name |
||
133 | * @param string $source php source file |
||
134 | * @param string $namespace optional php namespace |
||
135 | */ |
||
136 | public function add_admin_page_requirement($function, $source, $namespace = '') { |
||
140 | |||
141 | /** |
||
142 | * adds a requirement into the loader |
||
143 | * |
||
144 | * @param string $function php function name or class.class_name |
||
145 | * @param string $source php source file |
||
146 | * @param string $namespace optional php namespace |
||
147 | */ |
||
148 | public function add_requirement($function, $source, $namespace = '') { |
||
151 | |||
152 | /** |
||
153 | * gets an array of requirements for loading |
||
154 | * |
||
155 | * @return array the array of requirements |
||
156 | */ |
||
157 | public function get_requirements() { |
||
160 | } |
||
161 | |||
162 |
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
.