Skip to content

Commit e3bad05

Browse files
committed
move constants to config file
1 parent 4aa5323 commit e3bad05

File tree

3 files changed

+61
-61
lines changed

3 files changed

+61
-61
lines changed

SmartReportingEngine/src/Engine/constants.php

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,63 +11,3 @@
1111

1212

1313

14-
define("SRE_PUBLIC_REPORT", "PUBLIC_REPORT");
15-
16-
17-
/// a numeric data type
18-
/**
19-
* a numeric data type
20-
*/
21-
define("SRE_NUMBER","NUMBER");
22-
/**
23-
* A textual data type
24-
*/
25-
define("SRE_TEXT","TEXT");/**
26-
* A date data type
27-
*/
28-
define("SRE_DATE","DATE");
29-
/**
30-
* an array data type
31-
*/
32-
define("SRE_ARRAY","ARRAY");
33-
/**
34-
* An object data type
35-
*/
36-
define("SRE_OBJECT","OBJECT");
37-
/**
38-
* A Boolean data type
39-
*/
40-
define("SRE_BOOLEAN","BOOLEAN");
41-
/**
42-
* array of all allowed data types
43-
*/
44-
define("SRE_DATA_TYPES",json_encode(array(
45-
SRE_NUMBER,
46-
SRE_TEXT,
47-
SRE_DATE,
48-
SRE_ARRAY,
49-
SRE_OBJECT,
50-
SRE_BOOLEAN
51-
52-
)));
53-
/**
54-
* A table based data source
55-
*/
56-
define("SRE_Table","table");
57-
/**
58-
* A SQL query data source
59-
*/
60-
61-
define('BASEPATH', true);
62-
define("DIRECTACESS", true);
63-
define("SRE__Product_DIR__","SmartReportingEngine");
64-
define("SRE__src_DIR__","src");
65-
define("SRE__Engin__DIR__", "Engine"); //The directory in which the model classes is to be saved
66-
define("SRE__REPORTS__DIR__", "sre_reports"); //The directory in which reports to be stored
67-
define("SRE__CORE__DIR__", "Core"); //the directory in which the core engine files is located
68-
define("SRE_MOBILE_REDIRECT",false);
69-
define("SRE_SUM","sum");
70-
define("SRE_AVERGAE","average");
71-
define("SRE_COUNT","count");
72-
define("SRE_MAX","max");
73-
define("SRE_MIN","min");

sre_bootstrap.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
require_once(__DIR__."/sre_config/config.php");
33
require_once(__DIR__."/SmartReportingEngine/src/Engine/ErrorMessages.php");
4-
require_once(__DIR__."/SmartReportingEngine/src/Engine/constants.php");
54
require_once(__DIR__."/SmartReportingEngine/src/Engine/Helper.php");
65
require_once(__DIR__."/SmartReportingEngine/src/Engine/Filter.php");
76
require_once(__DIR__."/SmartReportingEngine/src/Engine/ReportPath.php");

sre_config/config.php

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,67 @@
3131
define("SRE_DEFAULT_LAYOUT_","AlignLeft");
3232
define("SRE_TEST_MODE",0);
3333

34+
define("SRE_PUBLIC_REPORT", "PUBLIC_REPORT");
35+
36+
37+
/// a numeric data type
38+
/**
39+
* a numeric data type
40+
*/
41+
define("SRE_NUMBER","NUMBER");
42+
/**
43+
* A textual data type
44+
*/
45+
define("SRE_TEXT","TEXT");/**
46+
* A date data type
47+
*/
48+
define("SRE_DATE","DATE");
49+
/**
50+
* an array data type
51+
*/
52+
define("SRE_ARRAY","ARRAY");
53+
/**
54+
* An object data type
55+
*/
56+
define("SRE_OBJECT","OBJECT");
57+
/**
58+
* A Boolean data type
59+
*/
60+
define("SRE_BOOLEAN","BOOLEAN");
61+
/**
62+
* array of all allowed data types
63+
*/
64+
define("SRE_DATA_TYPES",json_encode(array(
65+
SRE_NUMBER,
66+
SRE_TEXT,
67+
SRE_DATE,
68+
SRE_ARRAY,
69+
SRE_OBJECT,
70+
SRE_BOOLEAN
71+
72+
)));
73+
/**
74+
* A table based data source
75+
*/
76+
define("SRE_Table","table");
77+
/**
78+
* A SQL query data source
79+
*/
80+
81+
define('BASEPATH', true);
82+
define("DIRECTACESS", true);
83+
define("SRE__Product_DIR__","SmartReportingEngine");
84+
define("SRE__src_DIR__","src");
85+
define("SRE__Engin__DIR__", "Engine"); //The directory in which the model classes is to be saved
86+
define("SRE__REPORTS__DIR__", "sre_reports"); //The directory in which reports to be stored
87+
define("SRE__CORE__DIR__", "Core"); //the directory in which the core engine files is located
88+
define("SRE_MOBILE_REDIRECT",false);
89+
define("SRE_SUM","sum");
90+
define("SRE_AVERGAE","average");
91+
define("SRE_COUNT","count");
92+
define("SRE_MAX","max");
93+
define("SRE_MIN","min");
94+
3495

3596

3697

0 commit comments

Comments
 (0)