| 1: | <?php |
| 2: | namespace Sphp\core { |
| 3: | class Router { |
| 4: | /** @var string $url_extension extension use in URL default is .html */ |
| 5: | public $url_extension = ".html"; |
| 6: | /** @var string $act Controller Action */ |
| 7: | public $act = ""; |
| 8: | /** @var string $sact Controller Event */ |
| 9: | public $sact = ""; |
| 10: | /** @var string $evtp Controller Event Parameter */ |
| 11: | public $evtp = ""; |
| 12: | /** @var string $ctrl Current Request Controller */ |
| 13: | public $ctrl = ""; |
| 14: | /** @var string $uri Request URI */ |
| 15: | public $uri = ""; |
| 16: | /** |
| 17: | * Advance Function, Internal use |
| 18: | */ |
| 19: | public function route() {} |
| 20: | /** |
| 21: | * Get Current Request Controller |
| 22: | * @return string |
| 23: | */ |
| 24: | public function getCurrentRequest() {} |
| 25: | /** |
| 26: | * Check if any application registered with current request |
| 27: | * @return boolean |
| 28: | */ |
| 29: | public function isRegisterCurrentRequest() {} |
| 30: | /** |
| 31: | * Register Current Request with Application |
| 32: | * @param string $apppath Application file path like apps/index.app |
| 33: | * @param string $s_namespace Optional Namespace if any |
| 34: | * @param string $permtitle Title Display in Permission List |
| 35: | * @param array $permlist Create Permissions List for application |
| 36: | */ |
| 37: | public function registerCurrentRequest($apppath, $s_namespace = "",$permtitle="",$permlist=null) {} |
| 38: | /** |
| 39: | * Register Current Request with different Controller |
| 40: | * @param string $ctrl <p> |
| 41: | * registerCurrentController('home') |
| 42: | * </p> |
| 43: | */ |
| 44: | public function registerCurrentController($ctrl) {} |
| 45: | public function isRootURI() {} |
| 46: | /** |
| 47: | * Get Registered Application FilePath details of Current Request |
| 48: | * @return array |
| 49: | */ |
| 50: | public function getCurrentAppPath() {} |
| 51: | /** |
| 52: | * Get Registered Application FilePath details |
| 53: | * @param string $ctrl controller |
| 54: | * @return array |
| 55: | */ |
| 56: | public function getAppPath($ctrla2) {} |
| 57: | /** |
| 58: | * Generate URL for a Controller |
| 59: | * @param string $ControllerName controller like index |
| 60: | * @param string $extra <P> Extra query string in URL |
| 61: | * $extra = 'test=1&mpid=13' |
| 62: | * </p> |
| 63: | * @param string $newbasePath <p> new domain url |
| 64: | * $newbasePath = 'https://domain.com/test |
| 65: | * </p> |
| 66: | * @param boolean $blnSesID Add session id default false |
| 67: | * @return string |
| 68: | */ |
| 69: | public function getAppURL($ControllerName, $extra = "", $newbasePath = "", $blnSesID = false) {} |
| 70: | /** |
| 71: | * Generate URL for Current Application |
| 72: | * @param string $extra <P> Extra query string in URL |
| 73: | * $extra = 'test=1&mpid=13' |
| 74: | * </p> |
| 75: | * @param boolean $blnSesID Add session id default false |
| 76: | * @return string |
| 77: | */ |
| 78: | public function getthisURL($extra = "", $blnSesID = false) {} |
| 79: | /** |
| 80: | * Generate URL for a Event of Application |
| 81: | * @param string $eventName <p> Name of Event |
| 82: | * class index extends Sphp\tools\BasicApp{ |
| 83: | * public function page_event_test($evtp){ |
| 84: | * |
| 85: | * } |
| 86: | * } |
| 87: | * $eventName = test |
| 88: | * $controllerName = index |
| 89: | * Registered Application = apps/index.app |
| 90: | * </p> |
| 91: | * @param string $evtp Event Parameter pass to URL |
| 92: | * @param string $ControllerName controller like index |
| 93: | * @param string $extra <P> Extra query string in URL |
| 94: | * $extra = 'test=1&mpid=13' |
| 95: | * </p> |
| 96: | * @param string $newbasePath <p> new domain url |
| 97: | * $newbasePath = 'https://domain.com/test |
| 98: | * </p> |
| 99: | * @param boolean $blnSesID Add session id default false |
| 100: | * @return string |
| 101: | */ |
| 102: | public function getEventURL($eventName, $evtp = "", $ControllerName = "", $extra = "", $newbasePath = "", $blnSesID = false) {} |
| 103: | /** |
| 104: | * Advance Function, Internal use |
| 105: | * @param string $evt |
| 106: | * @param string $evtp |
| 107: | */ |
| 108: | public function setEventName($evt, $evtp = "") {} |
| 109: | } |
| 110: | } |
| 111: |