Recommend this page to a friend! |
Classes of Mostafa Abd-El-Hamid | PHP 7 MVC | README.md | Download |
|
DownloadMVCManon Systems MVC Framework To create a new Controller Create a new PHP Class and name it exactly as the route will be. Example: If you will create a dashboard and the route will be Dashboard, then the file will be Dashboard.php Into Dashboard.php you need to use the following namespaces: \Session\Handler To handle the Session library \Views\Main To handle the Views \Db\Connect To handle the Database library Create a class named Dashboard exactly like the same file name Create a public static magic function called __init() and you can assign a retun type fot it like: __init() : int __init() : string __init() : boolean __init() : float etcetera... Using this function, you can use your own custom functions from within the class. Then, you need to edit your DB Definitions using the file DbDefinitions into the libs folder. |