Configurations

Inphinit has different configurations, from constants to start the application, in addition to the existing configurations located in system/configs/, you can create your own configuration files for your own purposes.

Autoload

Inphinit Autoloader is an optimized loader that allows you to load classes installed via composer. To use Composer Autoloader, change the value INPHINIT_COMPOSER to true in index.php, for example:

define('INPHINIT_COMPOSER', true);

Constants

{placeholder}

Constant Editable Description
INPHINIT_COMPOSER ✔️
is editable
In the index.php file, set this constant to true if you want to use Composer Autoloader, otherwise it will use Inphinit Autoloader.
INPHINIT_ROOT ✔️
is editable
It must contain the path of the folder where index.php is located.
INPHINIT_START ✔️
is editable
It can be used for simple performance testing, estimating the time for something to execute, from the start of the execution.
INPHINIT_SYSTEM ✔️
is editable
It must contain the path of the system folder, this folder contains the project, data and packages.
INPHINIT_PATH
no editable
Contains the path of the current URL request. This constant is mainly used by the routing system.
INPHINIT_URL
no editable
Contains the URL where the application is located. This constant is mainly used by the route scoping system.

Production & Develop mode

system/configs/app.php

<?php return array( 'data_lifetime' => 86400, 'development' => true, 'fowarded_proto' => null, 'fowarded_host' => null, 'fowarded_port' => null, 'maintenance' => false, );

Descriptions

Constant Description
data_lifetime Configuration defined for different uses, initially used by sessions as a default value.
development Set true for development mode, in production set to false. See more details in Debugging.
forwarded_proto If you are using reverse proxy (load balancers, CDNs) you may not receive the expected protocol, so you can set value in this key, for example using X-Forwarded-Proto (see your hosting/cloud documentation before configuring). See more details in Forwarded.
forwarded_host If you are using reverse proxy (load balancers, CDNs) you may not receive the expected host, so you can set value in this key, for example using X-Forwarded-Host (see your hosting/cloud documentation before configuring).
forwarded_port If you are using reverse proxy (load balancers, CDNs) you may not receive the expected port, so you can set value in this key, for example using X-Forwarded-Host (see your hosting/cloud documentation before configuring).
maintenance Set true to down the application, all HTTP responses will receive code 503 and no routes will be executed. See more details in Maintenance.

Config files

{placeholder} system/configs/foobar.php {placeholder}

Go to homepage
Star us on Github