forked from jordanlev/phorms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phorms.php
69 lines (67 loc) · 2.7 KB
/
phorms.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* This is where the Phorms library is loaded.
* @package Phorms
*/
/**
* Constant used to determine path of includes.
*/
define('PHORMS_ROOT', dirname(__FILE__).'/');
define('PHORMS_AUTOLOAD', FALSE);
if(PHORMS_AUTOLOAD)
{
function __autoload( $name ) {
//var_dump($name);
// Get separated directories
$path = explode("_", $name);
// Store the last item as the name
$name = array_pop($path);
// Re-build path without last item
$path = implode('/', $path);
// Require it
require_once PHORMS_ROOT.$path.'/'.$name.'.class.php';
}
}
else
{
include(PHORMS_ROOT.'Phorm/Phorm.class.php');
include(PHORMS_ROOT.'Phorm/Language.class.php');
include(PHORMS_ROOT.'Phorm/ValidationError.class.php');
include(PHORMS_ROOT.'Phorm/Field.class.php');
include(PHORMS_ROOT.'Phorm/Fieldset.class.php');
include(PHORMS_ROOT.'Phorm/Widget.class.php');
include(PHORMS_ROOT.'Phorm/FieldsetPhorm.class.php');
include(PHORMS_ROOT.'Phorm/Field/Text.class.php');
include(PHORMS_ROOT.'Phorm/Field/Alpha.class.php');
include(PHORMS_ROOT.'Phorm/Field/Email.class.php');
include(PHORMS_ROOT.'Phorm/Field/Password.class.php');
include(PHORMS_ROOT.'Phorm/Field/AlphaNum.class.php');
include(PHORMS_ROOT.'Phorm/Field/FileUpload.class.php');
include(PHORMS_ROOT.'Phorm/Field/Regex.class.php');
include(PHORMS_ROOT.'Phorm/Field/Checkbox.class.php');
include(PHORMS_ROOT.'Phorm/Field/Hidden.class.php');
include(PHORMS_ROOT.'Phorm/Field/Scan.class.php');
include(PHORMS_ROOT.'Phorm/Field/DateTime.class.php');
include(PHORMS_ROOT.'Phorm/Field/ImageUpload.class.php');
include(PHORMS_ROOT.'Phorm/Field/Decimal.class.php');
include(PHORMS_ROOT.'Phorm/Field/MultipleChoice.class.php');
include(PHORMS_ROOT.'Phorm/Field/Textarea.class.php');
include(PHORMS_ROOT.'Phorm/Field/DropDown.class.php');
include(PHORMS_ROOT.'Phorm/Field/Integer.class.php');
include(PHORMS_ROOT.'Phorm/Field/URL.class.php');
include(PHORMS_ROOT.'Phorm/Type/File.class.php');
include(PHORMS_ROOT.'Phorm/Type/Image.class.php');
include(PHORMS_ROOT.'Phorm/Widget/Cancel.class.php');
include(PHORMS_ROOT.'Phorm/Widget/Checkbox.class.php');
include(PHORMS_ROOT.'Phorm/Widget/FileUpload.class.php');
include(PHORMS_ROOT.'Phorm/Widget/Hidden.class.php');
include(PHORMS_ROOT.'Phorm/Widget/OptionGroup.class.php');
include(PHORMS_ROOT.'Phorm/Widget/Password.class.php');
include(PHORMS_ROOT.'Phorm/Widget/Radio.class.php');
include(PHORMS_ROOT.'Phorm/Widget/Reset.class.php');
include(PHORMS_ROOT.'Phorm/Widget/Select.class.php');
include(PHORMS_ROOT.'Phorm/Widget/SelectMultiple.class.php');
include(PHORMS_ROOT.'Phorm/Widget/Submit.class.php');
include(PHORMS_ROOT.'Phorm/Widget/Text.class.php');
include(PHORMS_ROOT.'Phorm/Widget/Textarea.class.php');
}