PHP Classes


Recommend this page to a friend!
  Classes of Boss Ibrahim Mussa   Wepesi PHP Router with Parameters   Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Wepesi PHP Router with Parameters
Route requests to functions or controller classes
Author: By
Last change:
Date: 1 year ago
Size: 1,460 bytes


Class file image Download


This is a simple php module that will help you write clear route in php application


wepesi is a simple mini-framawork that help to create simple wep application using OOP logic. it provide : - routing - validation for more : - token (generator & validator) - ORM design for mySQL for more : - session management - ... you can find more about comple module on :


create an instance of the router, that will help implemet request method, assume that you should call the method run at the end of all the method to take into consideration all the route define.

    $router=new Router();
        echo "<h3>welcome to WEPESI ROUTING</h3>";

  • GET: while define a get method, you provide the route name to reach and the action to execute. that action can be a `callable` function or method of a class is define on the class folder.

            echo "welcome to the root";

    as you can seen in the example below, we want to reach the route `localhost/hello` and the action will be `hello` a method define on the class user `user#sayHello`. in case this method is not define that class it will not passe.