Centum\App

The App component provides the entry points and bootstrapping logic for Centum application, handling both web and CLI environments.

Overview

Check out SidRoberts/centum-project for working examples.

Web Example

To start the web application, use public/index.php:

<?php

require __DIR__ . "/../vendor/autoload.php";

use Centum\App\WebBootstrap;

$container = require __DIR__ . "/../config/container.php";

$bootstrap = $container->get(WebBootstrap::class);

$bootstrap->boot($container);

CLI Example

To start the CLI application, use bin/centum:

#!/usr/bin/env php
<?php

use Centum\App\ConsoleBootstrap;

require_once __DIR__ . "/../vendor/autoload.php";

$container = require __DIR__ . "/../config/container.php";

$bootstrap = $container->get(ConsoleBootstrap::class);

$bootstrap->boot($container);

Table of contents