PHP Classes

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

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 58 This week: 1All time: 10,488 This week: 571Up
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: 7 packages by
Country: Colombia Colombia
Age: 37
All time rank: 249714 in Colombia Colombia
Week rank: 420 Up2 in Colombia Colombia Up

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  
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  /  .github  
File Role Description
  Accessible without login Plain text file FUNDING.yml Data Auxiliary data

  Files folder image Files  /  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  /  routes  
File Role Description
  Accessible without login Plain text file routes.php Conf. Configuration script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:58
This week:1
All time:10,488
This week:571Up