summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-04 21:33:05 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-04 21:33:05 -0500
commit135b921db75da5995eab7e36393ecd4d2b0bc66f (patch)
tree46efc60fcf1f9d5c57ab1fb9418c2acfbda0698a /app/Core
parent850645dd6b22f5b495d1680e0b49540e0ebf9bd3 (diff)
Switch to composer
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/Loader.php62
1 files changed, 0 insertions, 62 deletions
diff --git a/app/Core/Loader.php b/app/Core/Loader.php
deleted file mode 100644
index 151081c1..00000000
--- a/app/Core/Loader.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-namespace Core;
-
-/**
- * Loader class
- *
- * @package core
- * @author Frederic Guillot
- */
-class Loader
-{
- /**
- * List of paths
- *
- * @access private
- * @var array
- */
- private $paths = array();
-
- /**
- * Load the missing class
- *
- * @access public
- * @param string $class Class name with namespace
- */
- public function load($class)
- {
- foreach ($this->paths as $path) {
-
- $filename = $path.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php';
-
- if (file_exists($filename)) {
- require $filename;
- break;
- }
- }
- }
-
- /**
- * Register the autoloader
- *
- * @access public
- */
- public function execute()
- {
- spl_autoload_register(array($this, 'load'));
- }
-
- /**
- * Register a new path
- *
- * @access public
- * @param string $path Path
- * @return Core\Loader
- */
- public function setPath($path)
- {
- $this->paths[] = $path;
- return $this;
- }
-}