|
|
|
@ -9,7 +9,7 @@
|
|
|
|
|
namespace flight\core;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The Loader class is resonsible for loading objects. It maintains
|
|
|
|
|
* The Loader class is responsible for loading objects. It maintains
|
|
|
|
|
* a list of reusable class instances and can generate a new class
|
|
|
|
|
* instances with custom initialization parameters. It also performs
|
|
|
|
|
* class autoloading.
|
|
|
|
@ -83,11 +83,9 @@ class Loader {
|
|
|
|
|
return $obj;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$class = ucfirst($name);
|
|
|
|
|
|
|
|
|
|
return ($shared) ?
|
|
|
|
|
$this->getInstance($class) :
|
|
|
|
|
$this->newInstance($class);
|
|
|
|
|
$this->getInstance($name) :
|
|
|
|
|
$this->newInstance($name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|