App controllers extend the Core\Controller class included in Exception.
Each controller load Exception native Controller components that will be used in every method of your application so you have access to:
php ef ctr-new CONTROLLER-NAME APP-FOLDER
getcontroller(CONTROLLER-NAME, CONTROLLER-FUNCTION, VARIABLES)
App models extend the Core\Model class included in Exception.
Each model load Exception database ORM that will be used in every method of your model so you have access to:
php ef mdl-new MODEL-NAME APP-FOLDER
getmodel(MODEL-NAME, MODEL-FUNCTION, VARIABLES)
App views are based on Twig template engine.
By default every view is cached into apps/APP-NAME/cache folder, you can change cache configuration into app env file.
You can recall a model into a controller or directly in a route with this function:
Rememeber that HTML-PATH is the path of twig html template into apps/APP-NAME/views without ".html" or ".twig" extention and VARS are optional.
You can exlude Twig engine and use PHP file as view (in some case can be useful). You have to recall a PHP view with
getview(PHP-PATH, VARIABLES, 0)
Rememeber that PHP-PATH is the path of php template into apps/APP-NAME/views without ".php" extention and VARS are optional.
A PHP code snippets is a code business logic useful to re-use in your controllers, routes or view.
By default $app object is included in every snippet.
You can create a new empty snippet using this command in your terminal:
php ef snp-new SNIPPET-NAME APP-FOLDER
Remember that SNIPPET-NAME is the desidered snippet name and APP-FOLDER is the application folder to use.
You can recall a snippet into a controller, view or directly in a route with this function:
Rememeber that SNIP-PATH is the path of php snippet into apps/APP-NAME/snippets without ".php" and VARS are optional.
Exception provides a global constant called APP with current environment and application variables.
This is the list of available variables:
Exception provides an optional $app singleton pattern that you can use into every part of the framework using "global $app;" and $app->method().
You can create your own custom classes putting your code into apps/APP-NAME/libraries folder and using them into your controllers. To do it all you have to do is:
You can install every third parts vendor you desire into your application compiling the apps/APP-NAME/composer.json file and running "composer update" command line in your terminal.
You can set apps configuration as constants variables compiling apps/global.php file for "all apps" configuration or compiling apps/APP-NAME/config.php file for any specific app.
Exception provides a native CLI suite (php ef) useful to develop quickly any project.
You can find a terminal commands list using "php ef help".
Exception provides a CLI that lets you to exec a curl to an URL so you can run schelude crons to your pages.
If you need you can protect them with a secret key.
To set cron in your server:
And edit it with (for example):
* * * * * /usr/bin/php path/to/framework/ef TASK-URL
Exception provides a CLI that lets you to exec backups and dumps in easer way.
The options are:
php ef help
Within composer package dev dependencies you have installed Kint debugger and PHP Unit Test.
To use them, you have to activate debug in env configuration file.
To debug you have to compile into your business logic:
If you disable debug mode in env file, all debugger snippets are not visualizable into frontend so you can keep them into production code-base if you prefer.
Write me an e-mail: [email protected]