PHP Classes

Packages of Rocklviv

Recommend this page to a friend!
  All class groups  >  All authors  >  Packages of Rocklviv (2)  >  Mission progress status  >  Reputation  
Picture of Rocklviv
Name: Rocklviv <contact>
Classes: 2
Country: Ukraine Ukraine
Age: 40
All time rank: 239035 in Ukraine Ukraine
Week rank: 195 Up4 in Ukraine Ukraine Up
All time users: 986
Week users: 0
 
  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z  
  Files folder image Leocore Router  
Route HTTP requests to callback functions
This package can route HTTP requests to callback functions.

It provides classes that can register one or more routes specifying a URL pattern and a callback function that will be called when a request is processed that matches the given URL pattern.

The class can also take an HTTP method and a request URI to call a router callback function associated with a URL pattern that matches the current URI.

The package also supports:

- Defining routes in class attributes.

- Discovering controller class with action functions using reflection

- Middleware clases to protect against CSRF attack and issuing CORS headers

  Files folder image Router  
Route request to controller based on the URL
This class can route the current request to controller based on the request URL.

It takes a list of supported routes and tries to match the current request with one of the routes to instantiate the associated controller class and call a given controller function.

The router class may fallback to an error controller if none of the configured routes matches the current request URI.


  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z