Skip to content
/ routing Public

Determines the right static or dynamic route based on a provided url in the most effective way.

License

Notifications You must be signed in to change notification settings

phplba/routing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phplba/routing

phplba/routing is a routing library that determines the right static or dynamic route based on a provided url in the most effective way.

You can associate any type of value to a route, the router just returns the right value and it is up to you to manipulate this return in order to call your constructors, hooks and any other elements you may need.

It is also your responsibility (for performance purposes) to provide the static and dynamic arrays and the regular expression needed for dynamic routing.

🛠️ Install as Dependencies

composer require phplba/routing

🧑🏻‍💻 Usage

use phplba/Routing/Router;

$router = new Router($routes, $regex);
$selected_route = $router->resolve($uri);

You can find more information on the documentation.

❤️ Support

A simple star to this project repo is enough to keep me motivated on this project for days. If you find your self very much excited with this project let me know with a discord MP.

If you have any questions, feel free to reach out to me on Discord (Angelisium#1997).

➤ License

Distributed under the MIT License. See LICENSE for more information.

About

Determines the right static or dynamic route based on a provided url in the most effective way.

Topics

Resources

License

Stars

Watchers

Forks

Languages