Added new global autoloader

This commit is contained in:
Shoghi Cervantes
2014-03-28 05:04:34 +01:00
parent b59926bece
commit fd8e5b27e5
5 changed files with 340 additions and 48 deletions

View File

@ -117,6 +117,7 @@ class Server{
private $serverID;
private $autoloader;
private $filePath;
private $dataPath;
private $pluginPath;
@ -299,6 +300,13 @@ class Server{
return $this->getConfigString("motd", "");
}
/**
* @return \SplClassLoader
*/
public function getLoader(){
return $this->autoloader;
}
/**
* @return PluginManager
*/
@ -445,13 +453,15 @@ class Server{
}
/**
* @param \SplClassLoader $autoloader
* @param string $filePath
* @param string $dataPath
* @param string $pluginPath
*/
public function __construct($filePath, $dataPath, $pluginPath){
public function __construct(\SplClassLoader $autoloader, $filePath, $dataPath, $pluginPath){
self::$instance = $this;
$this->autoloader = $autoloader;
$this->filePath = $filePath;
$this->dataPath = $dataPath;
$this->pluginPath = $pluginPath;