PHP Classes

Speed-Belt PHP Routing Class: Route the handling of HTTP requests to classes

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 58 All time: 10,536 This week: 673Up
Version License PHP version Categories
speedbelt 0.1GNU General Publi...7.4HTTP, Tools, PHP 7
Description 

Author

This class can route the handling of HTTP requests to classes.

It reads a configuration PHP script with an array with the definition of the supported routes.

The class can also process the current HTTP request by matching the request URI and HTTP method against the route configuration and then calls a method of an object of a class specified in the route configuration.

Picture of Luis Toscano
  Performance   Level  
Name: Luis Toscano <contact>
Classes: 8 packages by
Country: Colombia Colombia
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

Example


<?php

ini_set
('display_errors',0);

// Start Benchmark
$init_time = microtime(true);

// load core classes
include 'core/model.class.php';
include
'core/kitfast.class.php';

// load extra resources.

// load routes file
include 'routes/routes.php';


// instantiate Kompat Object
$app = new KompatNs\Kompat($routes);

// Add Resources
$app->addResources('orm','orm');

// Run the App
$app->run();


// End Benchmark
$final_time = microtime(true);
$benchmark = $final_time - $init_time;

echo
'<!-- Tiempo de Karga KitFast '.$benchmark.' Segundos -->';


Details

<div align="center"> <img src="https://i.imgur.com/IXw08oV.png" alt="SpeedBelt"> </div>

Routing system for standalone php scripting. centralize your request and coding more fast and easy.


  Files folder image Files (6)  
File Role Description
Files folder image.github (1 file)
Files folder imagecore (2 files)
Files folder imageroutes (1 file)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (6)  /  .github  
File Role Description
  Accessible without login Plain text file FUNDING.yml Data Auxiliary data

  Files folder image Files (6)  /  core  
File Role Description
  Plain text file kitfast.class.php Class Class source
  Plain text file model.class.php Class Class source

  Files folder image Files (6)  /  routes  
File Role Description
  Accessible without login Plain text file routes.php Conf. Configuration script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:58
This week:0
All time:10,536
This week:673Up