Really basic application object.
This commit is contained in:
		@@ -1 +1,10 @@
 | 
			
		||||
{}
 | 
			
		||||
{
 | 
			
		||||
	"autoload": {
 | 
			
		||||
		"psr-4": {
 | 
			
		||||
			"Core\\": "core/"
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
    "require": {
 | 
			
		||||
        "illuminate/container": "^8.18"
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										207
									
								
								composer.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										207
									
								
								composer.lock
									
									
									
										generated
									
									
									
										Normal 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
									
								
								core/Application/Application.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								core/Application/Application.php
									
									
									
									
									
										Normal 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.
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -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();
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * todo: Create a new bootstrap architecture.
 | 
			
		||||
 * Load providers
 | 
			
		||||
 */
 | 
			
		||||
require_once __DIR__ . '/../app/Bootstrap.php';
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Create application & run
 | 
			
		||||
 */
 | 
			
		||||
$application = new Application(
 | 
			
		||||
	$container
 | 
			
		||||
);
 | 
			
		||||
$application->run();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user