Browse Source

Really basic application object.

pull/2/head
Romano Schoonheim 1 year ago
parent
commit
cf30a1280d
4 changed files with 255 additions and 4 deletions
  1. +10
    -1
      composer.json
  2. +207
    -0
      composer.lock
  3. +20
    -0
      core/Application/Application.php
  4. +18
    -3
      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"
}

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

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

+ 18
- 3
public/index.php View File

@ -3,9 +3,24 @@
/**
* Composer autoload
*/
require_once __DIR__ . '/../vendor/autoload.php';
use Core\Application\Application;
use Illuminate\Container\Container;
require_once __DIR__ . '/../vendor/autoload.php';
$container = new Container();
/**
* Load providers
*/
/**
* todo: Create a new bootstrap architecture.
* Create application & run
*/
require_once __DIR__ . '/../app/Bootstrap.php';
$application = new Application(
$container
);
$application->run();

Loading…
Cancel
Save