Initial commit
This commit is contained in:
commit
06f17dff5b
9 changed files with 115 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.idea
|
||||
vendor
|
13
app/Http/Controllers/BaseController.php
Normal file
13
app/Http/Controllers/BaseController.php
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Runtime\Http\Controllers\Controller;
|
||||
|
||||
class BaseController extends Controller {
|
||||
|
||||
public function test() {
|
||||
return $this->lol();
|
||||
}
|
||||
|
||||
}
|
25
composer.json
Normal file
25
composer.json
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "maartenvr98/framework",
|
||||
"type": "project",
|
||||
"description": "Another Cool Framework.",
|
||||
"keywords": [
|
||||
"framework"
|
||||
],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^7.2"
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Runtime\\": "src/Runtime/",
|
||||
"App\\": "app/"
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
}
|
19
composer.lock
generated
Normal file
19
composer.lock
generated
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "6de065434f40becaf0a1e74d6aaff7a9",
|
||||
"packages": [],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^7.2"
|
||||
},
|
||||
"platform-dev": []
|
||||
}
|
5
index.php
Normal file
5
index.php
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
include 'vendor/autoload.php';
|
||||
|
||||
echo \Runtime\Bootstrap::handle();
|
0
routes/web.php
Normal file
0
routes/web.php
Normal file
28
src/Runtime/Bootstrap.php
Normal file
28
src/Runtime/Bootstrap.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace Runtime;
|
||||
|
||||
use App\Http\Controllers\BaseController;
|
||||
|
||||
class Bootstrap {
|
||||
|
||||
/**
|
||||
* Start handling process
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function handle() {
|
||||
return (new Bootstrap())->run();
|
||||
}
|
||||
|
||||
private $base;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->base = new BaseController();
|
||||
}
|
||||
|
||||
protected function run() {
|
||||
return $this->base->test();
|
||||
}
|
||||
}
|
11
src/Runtime/Http/Controllers/Controller.php
Normal file
11
src/Runtime/Http/Controllers/Controller.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Runtime\Http\Controllers;
|
||||
|
||||
class Controller {
|
||||
|
||||
public function lol() {
|
||||
return new ControllerExtractor();
|
||||
}
|
||||
|
||||
}
|
12
src/Runtime/Http/Controllers/ControllerExtractor.php
Normal file
12
src/Runtime/Http/Controllers/ControllerExtractor.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace Runtime\Http\Controllers;
|
||||
|
||||
class ControllerExtractor {
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return "Het werkt :)";
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue