Skip to content

Instantly share code, notes, and snippets.

@victorknust
Created Feb 23, 2017
Embed
What would you like to do?
<?php
namespace App;
class App
{
public function __construct()
{
$controller = new Controller\Example;
}
}
<?php
namespace App\Controller;
//use App\Model\Example as Model;
class Example
{
public function __construct()
{
$model = new \App\Model\Example();
}
}
<?php
//spl_autoload_extensions('.php');
spl_autoload_register();
/*
* spl_autoload_register(
* function ($class) {
* spl_autoload(str_replace('\\', DIRECTORY_SEPARATOR, $class));
* }
* );
*/
$app = new \App\App;
<?php
namespace App\Model;
class Example
{
public function __construct()
{
echo 'Hello World!';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment