I've been reading up upon Dependency Injection and DI Containers. However I can't wrap my head around this concept.
How would the DI container know that 'controller' depends on 'loader' and load 'loader' before 'controller'?
The way I see it is that it would need some kind of config file to keep track of the dependencies, and if so isn't it just easier to write:
// Controller
function __construct() {
$this->load = new \Framework\Core\Loader;
}