Framework

PHP Bootstrap: index.php

Here is the start point of Application. You can uncomment first line to activate "REDCAT_FREEZE_DI", this is the last optimization step for server in production, it will serialize the resolved config.

<?php
//define('REDCAT_DEV_CONFIG',false);
$redcat = require_once 'redcat.php';
$route = $redcat->create('#router');
$route->load();
$route->runFromGlobals();

The framework bootstrap: redcat.php

Its roles are to define "REDCAT" and "REDCAT_CWD" path constants, load composer and third Autoload, load the config and dependency injection rules and handle the error behavior accorstrategy to configured dev level.
The variable returned by redcat.php is an instance of RedCat\Framework\App which is an extension of RedCat\Strategy\Di, the main dependency injection container. It will also be used as a common front factory.

<?php
define('REDCAT',__DIR__.'/');
define('REDCAT_CWD',getcwd().'/');
$loader = require __DIR__.'/packages/autoload.php';
$redcat = RedCat\Framework\App::bootstrap($loader);
return $redcat;

The IoC is performed accross the whole application from .config.php via this Dependency Injection Container.

RedCat\Framework

The RedCat\Framework namespace is used to add somes php component which are totaly dependent and based on other RedCat components.
It is the coupling couch where all components meet others and start working together.
Is where you'll can find implementation of FrontOffice and Backoffice for basic CMS, customization and plugins for Templix.

tags: