aboutsummaryrefslogtreecommitdiff
path: root/src/phinde/Autoloader.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2016-02-03 06:21:30 +0100
committerChristian Weiske <cweiske@cweiske.de>2016-02-03 06:21:30 +0100
commit226508cd8d3e8c147ad314a0de483e08be71c254 (patch)
tree4142696d28830efa13835be79fd3ee888a4ab0a4 /src/phinde/Autoloader.php
parent7b4425b096fa8c18d0db9fd9b1ae96d63ee8af55 (diff)
downloadphinde-226508cd8d3e8c147ad314a0de483e08be71c254.tar.gz
phinde-226508cd8d3e8c147ad314a0de483e08be71c254.zip
first frontend
Diffstat (limited to 'src/phinde/Autoloader.php')
-rw-r--r--src/phinde/Autoloader.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/phinde/Autoloader.php b/src/phinde/Autoloader.php
new file mode 100644
index 0000000..4717e1c
--- /dev/null
+++ b/src/phinde/Autoloader.php
@@ -0,0 +1,21 @@
+<?php
+namespace phinde;
+
+class Autoloader
+{
+ public static function autoload($class)
+ {
+ $file = str_replace(array('\\', '_'), '/', $class)
+ . '.php';
+ if (stream_resolve_include_path($file)) {
+ require_once $file;
+ }
+ }
+
+ public static function register()
+ {
+ set_include_path(__DIR__ . '/../' . PATH_SEPARATOR . get_include_path());
+ spl_autoload_register('phinde\\Autoloader::autoload');
+ }
+}
+?>