1 | <?php |
||
14 | class Loader { |
||
15 | private $requirements; |
||
16 | private $routes; |
||
17 | private $admin_routes; |
||
18 | private $public_routes; |
||
19 | |||
20 | /** |
||
21 | * Loader constructor. |
||
22 | */ |
||
23 | public function __construct() { |
||
29 | |||
30 | /** |
||
31 | * gets the page routes |
||
32 | * |
||
33 | * @return array of routes |
||
34 | */ |
||
35 | public function get_routes() { |
||
38 | |||
39 | /** |
||
40 | * gets the admin page routes |
||
41 | * |
||
42 | * @return array of routes |
||
43 | */ |
||
44 | public function get_admin_routes() { |
||
47 | |||
48 | /** |
||
49 | * gets the public page routes |
||
50 | * |
||
51 | * @return array of routes |
||
52 | */ |
||
53 | public function get_public_routes() { |
||
56 | |||
57 | /** |
||
58 | * returns the value of a setting |
||
59 | * |
||
60 | * @param string $setting |
||
61 | * @return mixed the value of the setting |
||
62 | */ |
||
63 | public function get_setting($setting) { |
||
66 | |||
67 | /** |
||
68 | * adds a requirement into the loader and registers it as a page with the router |
||
69 | * |
||
70 | * @param string $function php function name or class.class_name |
||
71 | * @param string $source php source file |
||
72 | * @param string $namespace optional php namespace |
||
73 | */ |
||
74 | public function add_page_requirement($function, $source, $namespace = '') { |
||
79 | |||
80 | /** |
||
81 | * adds a requirement into the loader and registers it as a page with the router |
||
82 | * |
||
83 | * @param string $function php function name or class.class_name |
||
84 | * @param string $source php source file |
||
85 | * @param string $namespace optional php namespace |
||
86 | */ |
||
87 | public function add_root_page_requirement($function, $source, $namespace = '') { |
||
91 | |||
92 | /** |
||
93 | * adds a requirement into the loader and registers it as a page with the router |
||
94 | * |
||
95 | * @param string $function php function name or class.class_name |
||
96 | * @param string $path source file path |
||
97 | */ |
||
98 | public function add_public_path($page, $source) { |
||
101 | |||
102 | /** |
||
103 | * adds a requirement into the loader and registers it as a page with the router |
||
104 | * |
||
105 | * @param string $function php function name or class.class_name |
||
106 | * @param string $source php source file |
||
107 | * @param string $namespace optional php namespace |
||
108 | */ |
||
109 | public function add_ajax_page_requirement($function, $source, $namespace = '') { |
||
113 | |||
114 | /** |
||
115 | * adds a requirement into the loader and registers it as a page with the router |
||
116 | * |
||
117 | * @param string $function php function name or class.class_name |
||
118 | * @param string $source php source file |
||
119 | * @param string $namespace optional php namespace |
||
120 | */ |
||
121 | public function add_admin_page_requirement($function, $source, $namespace = '') { |
||
125 | |||
126 | /** |
||
127 | * adds a requirement into the loader |
||
128 | * |
||
129 | * @param string $function php function name or class.class_name |
||
130 | * @param string $source php source file |
||
131 | * @param string $namespace optional php namespace |
||
132 | */ |
||
133 | public function add_requirement($function, $source, $namespace = '') { |
||
136 | |||
137 | /** |
||
138 | * gets an array of requirements for loading |
||
139 | * |
||
140 | * @return array the array of requirements |
||
141 | */ |
||
142 | public function get_requirements() { |
||
145 | } |
||
146 | |||
147 |
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
.