@@ -8,26 +8,26 @@ discard block |
||
| 8 | 8 | * @copyright Copyright (c) 2015, Austin Artistic Reconstruction |
| 9 | 9 | * @license http://www.apache.org/licenses/ Apache 2.0 License |
| 10 | 10 | */ |
| 11 | -if(file_exists(__DIR__ . '/vendor/autoload.php')) |
|
| 11 | +if(file_exists(__DIR__.'/vendor/autoload.php')) |
|
| 12 | 12 | { |
| 13 | - require(__DIR__ . '/vendor/autoload.php'); |
|
| 13 | + require(__DIR__.'/vendor/autoload.php'); |
|
| 14 | 14 | } |
| 15 | -else if(file_exists(__DIR__ . '/../common/Autoload.php')) |
|
| 15 | +else if(file_exists(__DIR__.'/../common/Autoload.php')) |
|
| 16 | 16 | { |
| 17 | - require(__DIR__ . '/../common/Autoload.php'); |
|
| 17 | + require(__DIR__.'/../common/Autoload.php'); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | -spl_autoload_register(function ($class) { |
|
| 20 | +spl_autoload_register(function($class) { |
|
| 21 | 21 | |
| 22 | 22 | // project-specific namespace prefix |
| 23 | 23 | $prefix = 'Flipside\\Profiles\\'; |
| 24 | 24 | |
| 25 | 25 | // base directory for the namespace prefix |
| 26 | - $base_dir = __DIR__ . '/'; |
|
| 26 | + $base_dir = __DIR__.'/'; |
|
| 27 | 27 | |
| 28 | 28 | // does the class use the namespace prefix? |
| 29 | 29 | $len = strlen($prefix); |
| 30 | - if (strncmp($prefix, $class, $len) !== 0) { |
|
| 30 | + if(strncmp($prefix, $class, $len) !== 0) { |
|
| 31 | 31 | // no, move to the next registered autoloader |
| 32 | 32 | return; |
| 33 | 33 | } |
@@ -38,10 +38,10 @@ discard block |
||
| 38 | 38 | // replace the namespace prefix with the base directory, replace namespace |
| 39 | 39 | // separators with directory separators in the relative class name, append |
| 40 | 40 | // with .php |
| 41 | - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
| 41 | + $file = $base_dir.str_replace('\\', '/', $relative_class).'.php'; |
|
| 42 | 42 | |
| 43 | 43 | // if the file exists, require it |
| 44 | - if (file_exists($file)) { |
|
| 44 | + if(file_exists($file)) { |
|
| 45 | 45 | require $file; |
| 46 | 46 | } |
| 47 | 47 | }); |