-
Notifications
You must be signed in to change notification settings - Fork 7
/
autoload.php
36 lines (31 loc) · 959 Bytes
/
autoload.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
<?php
/**
* Address Standardization Solution, PHP Edition.
*
* Requires PHP 5 or later.
*
* Address Standardization Solution is a trademark of The Analysis
* and Solutions Company.
*
* @package AddressStandardizationSolution
* @author Daniel Convissor <[email protected]>
* @copyright The Analysis and Solutions Company, 2001-2010
* @license http://www.analysisandsolutions.com/software/license.htm Simple Public License
* @link http://www.analysisandsolutions.com/software/addr/addr.htm
*/
/**
* PHP's function that auto-magically includes files when classes
* therein are instantiated
*/
function autoload_address_standardization($class) {
static $path;
if (!isset($path)) {
$path = realpath(dirname(__FILE__));
}
if (strpos($class, 'Test') !== false) {
include $path . '/Test/' . $class . '.php';
} else {
include $path . '/' . $class . '.php';
}
}
spl_autoload_register('autoload_address_standardization');