Created
February 23, 2017 18:02
-
-
Save victorknust/820bb941d00c3166b7a65a19d38b1f3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
class App | |
{ | |
public function __construct() | |
{ | |
$controller = new Controller\Example; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
//use App\Model\Example as Model; | |
class Example | |
{ | |
public function __construct() | |
{ | |
$model = new \App\Model\Example(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//spl_autoload_extensions('.php'); | |
spl_autoload_register(); | |
/* | |
* spl_autoload_register( | |
* function ($class) { | |
* spl_autoload(str_replace('\\', DIRECTORY_SEPARATOR, $class)); | |
* } | |
* ); | |
*/ | |
$app = new \App\App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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