6 * APPLICATION-WIDE CONFIGURATION SETTINGS
8 * This file contains application-wide configuration settings. The settings
9 * here will be the same regardless of the machine on which the app is running.
11 * This configuration should be added to version control.
13 * No settings should be added to this file that would need to be changed
14 * on a per-machine basic (ie local, staging or production). Any
15 * machine-specific settings should be added to _machine_config.php
17 * From phreeze package
18 * @license http://www.gnu.org/copyleft/lesser.html LGPL
23 * APPLICATION ROOT DIRECTORY
24 * If the application doesn't detect this correctly then it can be set explicitly
26 if (!GlobalConfig
::$APP_ROOT) {
27 GlobalConfig
::$APP_ROOT = realpath("./");
31 * check is needed to ensure asp_tags is not enabled
33 if (ini_get('asp_tags')) {
34 die('<h3>Server Configuration Problem: asp_tags is enabled, but is not compatible with Savant.</h3>' . '<p>You can disable asp_tags in .htaccess, php.ini or generate your app with another template engine such as Smarty.</p>');
39 * Adjust the include path as necessary so PHP can locate required libraries
41 set_include_path(GlobalConfig
::$APP_ROOT . '/libs/' . PATH_SEPARATOR
. GlobalConfig
::$APP_ROOT . '/fwk/libs' . PATH_SEPARATOR
. get_include_path());
45 * Uncomment if Composer is being used to manage dependencies
47 // $loader = require 'vendor/autoload.php';
48 // $loader->setUseIncludePath(true);
52 * Any classes that will be stored in the session can be added here
53 * and will be pre-loaded on every page
55 //require_once "App/SecureApp.php";
59 * You can use any template system that implements
60 * IRenderEngine for the view layer.
61 * Phreeze provides pre-built
62 * implementations for Smarty, Savant and plain PHP.
64 require_once 'verysimple/Phreeze/SavantRenderEngine.php';
65 GlobalConfig
::$TEMPLATE_ENGINE = 'SavantRenderEngine';
66 GlobalConfig
::$TEMPLATE_PATH = GlobalConfig
::$APP_ROOT . '/templates/';
70 * The route map connects URLs to Controller+Method and additionally maps the
71 * wildcards to a named parameter so that they are accessible inside the
72 * Controller without having to parse the URL for parameters such as IDs
74 GlobalConfig
::$ROUTE_MAP = array(
76 // default controller when no route specified
77 // 'GET:' => array('route' => 'Default.Home'),
78 // permission setting for p_acl:
79 // p_all - available to all
80 // p_limited - only the data that is pertinent to the patient is available
81 // p_none - not available for patients
82 // permission setting for p_reg:
83 // true - permission for patient registration
84 // false - no permission for patient registration
86 'route' => 'Provider.Home',
90 'GET:provider' => array(
91 'route' => 'Provider.Home',
97 'GET:patientdata' => array(
98 'route' => 'Patient.ListView',
99 'p_acl' => 'p_all', // Secured this at downstream function level
100 'p_reg' => true // Secured this at downstream function level
102 'GET:api/patientdata' => array(
103 'route' => 'Patient.Query',
104 'p_acl' => 'p_all', // Secured this at downstream function level
105 'p_reg' => true // Secured this at downstream function level
107 'POST:api/patient' => array(
108 'route' => 'Patient.Create',
112 'GET:api/patient/(:num)' => array(
113 'route' => 'Patient.Read',
117 'p_acl' => 'p_limited',
120 'PUT:api/patient/(:num)' => array(
121 'route' => 'Patient.Update',
125 'p_acl' => 'p_limited',
128 'DELETE:api/patient/(:num)' => array(
129 'route' => 'Patient.Delete',
133 'p_acl' => 'p_limited',
136 'PUT:api/portalpatient/(:num)' => array(
137 'route' => 'PortalPatient.Update',
141 'p_acl' => 'p_limited',
144 'GET:api/portalpatient/(:num)' => array(
145 'route' => 'PortalPatient.Read',
149 'p_acl' => 'p_limited',
154 'GET:onsitedocuments' => array(
155 'route' => 'OnsiteDocument.ListView',
156 'p_acl' => 'p_all', // Secured this at downstream function level
159 'GET:onsitedocument/(:num)' => array(
160 'route' => 'OnsiteDocument.SingleView',
164 'p_acl' => 'p_all', // Secured this at downstream function level
167 'GET:api/onsitedocuments' => array(
168 'route' => 'OnsiteDocument.Query',
169 'p_acl' => 'p_all', // Secured this at downstream function level
172 'POST:api/onsitedocument' => array(
173 'route' => 'OnsiteDocument.Create',
174 'p_acl' => 'p_all', // Secured this at downstream function level
177 'GET:api/onsitedocument/(:num)' => array(
178 'route' => 'OnsiteDocument.Read',
182 'p_acl' => 'p_all', // Secured this at downstream function level
185 'PUT:api/onsitedocument/(:num)' => array(
186 'route' => 'OnsiteDocument.Update',
190 'p_acl' => 'p_all', // Secured this at downstream function level
193 'DELETE:api/onsitedocument/(:num)' => array(
194 'route' => 'OnsiteDocument.Delete',
198 'p_acl' => 'p_all', // Secured this at downstream function level
202 // OnsitePortalActivity
203 'GET:onsiteportalactivities' => array(
204 'route' => 'OnsitePortalActivity.ListView',
208 'GET:api/onsiteportalactivities' => array(
209 'route' => 'OnsitePortalActivity.Query',
210 'p_acl' => 'p_all', // Secured this at downstream function level
213 'POST:api/onsiteportalactivity' => array(
214 'route' => 'OnsitePortalActivity.Create',
215 'p_acl' => 'p_all', // Secured this at downstream function level
218 'GET:api/onsiteportalactivity/(:num)' => array(
219 'route' => 'OnsitePortalActivity.Read',
223 'p_acl' => 'p_all', // Secured this at downstream function level
226 'PUT:api/onsiteportalactivity/(:num)' => array(
227 'route' => 'OnsitePortalActivity.Update',
231 'p_acl' => 'p_all', // Secured this at downstream function level
234 'DELETE:api/onsiteportalactivity/(:num)' => array(
235 'route' => 'OnsitePortalActivity.Delete',
243 // OnsiteActivityView
244 'GET:onsiteactivityviews' => array(
245 'route' => 'OnsiteActivityView.ListView',
249 'GET:api/onsiteactivityviews' => array(
250 'route' => 'OnsiteActivityView.Query',
254 'GET:api/onsiteactivityview/(:any)' => array(
255 'route' => 'OnsiteActivityView.Read',
263 // User no route no problem. leaving for now. 01/23/21
264 /*'GET:users' => array(
265 'route' => 'User.ListView',
269 'GET:api/users' => array(
270 'route' => 'User.Query',
271 'p_acl' => 'p_all', // Secured this at downstream function level
272 'p_reg' => true // Secured this at downstream function level
274 'GET:api/user/(:num)' => array(
275 'route' => 'User.Read',
283 // catch any broken API urls
284 'GET:api/(:any)' => array(
285 'route' => 'Provider.ErrorApi404'
287 'PUT:api/(:any)' => array(
288 'route' => 'Provider.ErrorApi404'
290 'POST:api/(:any)' => array(
291 'route' => 'Provider.ErrorApi404'
293 'DELETE:api/(:any)' => array(
294 'route' => 'Provider.ErrorApi404'