Browse Source

Merge pull request 'feature/bootstrap' (#2) from feature/bootstrap into remastering

Reviewed-on: #2
3.0
Václav Španinger 1 year ago
parent
commit
30045b9f65
6 changed files with 283 additions and 3 deletions
  1. +10
    -1
      composer.json
  2. +207
    -0
      composer.lock
  3. +5
    -0
      config/application.php
  4. +26
    -0
      core/Application/Application.php
  5. +11
    -0
      core/Configuration/Configurations.php
  6. +24
    -2
      public/index.php

+ 10
- 1
composer.json View File

@ -1 +1,10 @@
{}
{
"autoload": {
"psr-4": {
"Core\\": "core/"
}
},
"require": {
"illuminate/container": "^8.18"
}
}

+ 207
- 0
composer.lock View File

@ -0,0 +1,207 @@
{
"_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": "c3305b3f3f6089062c2031140866dab7",
"packages": [
{
"name": "illuminate/container",
"version": "v8.18.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/container.git",
"reference": "657cac2aa601aa0223afe0ed8627d0cb443f6a22"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/container/zipball/657cac2aa601aa0223afe0ed8627d0cb443f6a22",
"reference": "657cac2aa601aa0223afe0ed8627d0cb443f6a22",
"shasum": ""
},
"require": {
"illuminate/contracts": "^8.0",
"php": "^7.3|^8.0",
"psr/container": "^1.0"
},
"provide": {
"psr/container-implementation": "1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "8.x-dev"
}
},
"autoload": {
"psr-4": {
"Illuminate\\Container\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Taylor Otwell",
"email": "taylor@laravel.com"
}
],
"description": "The Illuminate Container package.",
"homepage": "https://laravel.com",
"time": "2020-12-01T14:31:29+00:00"
},
{
"name": "illuminate/contracts",
"version": "v8.18.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/contracts.git",
"reference": "a73835aad399da42e88217bdbb5e1e4c1e668807"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/a73835aad399da42e88217bdbb5e1e4c1e668807",
"reference": "a73835aad399da42e88217bdbb5e1e4c1e668807",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0",
"psr/container": "^1.0",
"psr/simple-cache": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "8.x-dev"
}
},
"autoload": {
"psr-4": {
"Illuminate\\Contracts\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Taylor Otwell",
"email": "taylor@laravel.com"
}
],
"description": "The Illuminate Contracts package.",
"homepage": "https://laravel.com",
"time": "2020-11-18T13:57:08+00:00"
},
{
"name": "psr/container",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
"homepage": "https://github.com/php-fig/container",
"keywords": [
"PSR-11",
"container",
"container-interface",
"container-interop",
"psr"
],
"time": "2017-02-14T16:28:37+00:00"
},
{
"name": "psr/simple-cache",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/simple-cache.git",
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\SimpleCache\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interfaces for simple caching",
"keywords": [
"cache",
"caching",
"psr",
"psr-16",
"simple-cache"
],
"time": "2017-10-23T01:57:42+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "1.1.0"
}

+ 5
- 0
config/application.php View File

@ -0,0 +1,5 @@
<?php
return [
'providers' => []
];

+ 26
- 0
core/Application/Application.php View File

@ -0,0 +1,26 @@
<?php
namespace Core\Application;
use Core\Configuration\Configurations;
use Illuminate\Container\Container;
class Application
{
/** @var Container $container */
private $container;
/** @var Configurations */
private $configurations;
public function __construct(Container $container, Configurations $configurations)
{
$this->container = $container;
$this->configurations = $configurations;
}
public function run(): void
{
//todo: implement run logic.
}
}

+ 11
- 0
core/Configuration/Configurations.php View File

@ -0,0 +1,11 @@
<?php
namespace Core\Configuration;
/**
* Class Configurations
* @package Core\Configuration
* @author Romano Schoonheim https://github.com/romano1996
*/
class Configurations
{}

+ 24
- 2
public/index.php View File

@ -3,9 +3,31 @@
/**
* Composer autoload
*/
require_once __DIR__ . '/../vendor/autoload.php';
use Core\Application\Application;
use Core\Configuration\Configurations;
use Illuminate\Container\Container;
require_once __DIR__ . '/../vendor/autoload.php';
$container = new Container();
$container->singleton(
Configurations::class,
Configurations::class
);
/**
* Create application & run
*/
$application = new Application(
$container,
$container->make(Configurations::class)
);
$application->run();
/**
* todo: Create a new bootstrap architecture.
* Bootstrap v1.0
*/
require_once __DIR__ . '/../app/Bootstrap.php';

Loading…
Cancel
Save