-
-
Notifications
You must be signed in to change notification settings - Fork 2
Utilities
Emanuele Minotto edited this page Dec 3, 2024
·
6 revisions
The crystal microframework offers some utilities, like the 404 route.
But there are other utilities offered!
The utilities are:
- an Autoloader based on the PSR-0 standard
- a Dependency Injection system, with a signature based on PSR-11
- a Template Engine available from PHP 5
- a Logger available from PHP 5, with a signature based on PSR-3
- storable Settings
- a Database interaction system
- a Double access utility
Excluding the utilities described above, other utilities are:
$server = $mf('server');
var_dump($server['SERVER_NAME']); // localhost
$mf('get') // -> $_GET (with double access)
$mf('post') // -> $_POST (with double access)
$mf('cookie') // -> $_COOKIE (with double access)
$mf('env') // -> $_ENV (with double access)
$mf('request') // -> $_REQUEST (with double access)
$mf('server') // -> $_SERVER (with double access)