PHP code example of oxygenzsas / composer_lib_router
1. Go to this page and download the library: Download oxygenzsas/composer_lib_router library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
oxygenzsas / composer_lib_router example snippets
// Creation de l'objet
$router = new \OxygenzSAS\Rooter\Rooter();
// Définir une page 404
$router->set404(function(){
echo 'ma page 404';
});
// creation du dispatcher
$Dispatcher = new OxygenzSAS\Dispatcher\Dispatcher();
// creer le router
$router = new OxygenzSAS\Rooter\Rooter();
// Définir une page 404
$router->set404(function(){
echo 'ma page 404';
});
// ajouter les route ici, par exemple
$router->get('/home', ['maClasse', 'maMethode']);
// ajout le middlewares
$Dispatcher->pipe($router);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.