xylemical/kernel

Provides an application kernel supported by controller behaviour.

dev-master 2022-06-30 05:48 UTC

This package is auto-updated.

Last update: 2024-04-29 05:05:57 UTC


README

Provides an application kernel.

Install

The recommended way to install this library is through composer.

composer require xylemical/kernel

Usage

<?php

declare(strict_types=1);

use Xylemical\Config\ConfigFactory;
use Xylemical\Config\Source\ConfigFileSource;
use Xylemical\Kernel\Container\ConfigContainerSource;
use Xylemical\Kernel\Information;
use Xylemical\Kernel\Kernel;

require 'vendor/autoload.php';

$info = new Information('dummy', '');
$config = new ConfigFileSource('config.php');
$factory = new ConfigFactory($config);
$container = new ConfigContainerSource($factory->get('container'));

$kernel = new Kernel($info, $config, $container, __DIR__);
exit($kernel->run());

License

MIT, see LICENSE.