| 1: | <?php |
| 2: | namespace Sphp\tools { |
| 3: | /** |
| 4: | * Description of BasicApp |
| 5: | * |
| 6: | * @author Sartaj Singh |
| 7: | */ |
| 8: | class BasicApp extends SphpApp { |
| 9: | /** @var \Sphp\kit\Page $page */ |
| 10: | public $page = ""; |
| 11: | /** @var \Sphp\tools\TempFile $tempform */ |
| 12: | public $tempform; |
| 13: | /** @var \Sphp\tools\TempFile $maintempform */ |
| 14: | public $maintempform; |
| 15: | /** @var string $apppath application folder path */ |
| 16: | public $apppath = ""; |
| 17: | /** @var string $phppath res folder path */ |
| 18: | public $phppath = ""; |
| 19: | /** @var string $respath res browser url */ |
| 20: | public $respath = ""; |
| 21: | /** @var string $myrespath application browser url */ |
| 22: | public $myrespath = ""; |
| 23: | /** @var string $mypath application folder path */ |
| 24: | public $mypath = ""; |
| 25: | /** @var \Sphp\kit\JSServer $JSServer */ |
| 26: | public $JSServer = null; |
| 27: | /** @var \Sphp\core\Request $Client */ |
| 28: | public $Client = null; |
| 29: | /** @var \MySQL $dbEngine */ |
| 30: | public $dbEngine = null; |
| 31: | /** @var \Sphp\core\DebugProfiler $debug */ |
| 32: | public $debug = null; |
| 33: | /** |
| 34: | * Advance function for change the behavior of app |
| 35: | * @param \Sphp\tools\TempFile $tempobj |
| 36: | */ |
| 37: | public function setup($tempobj) {} |
| 38: | /** |
| 39: | * Advance function for change the behavior of app |
| 40: | * @param \Sphp\tools\TempFile $tempobj |
| 41: | */ |
| 42: | public function process($tempobj) {} |
| 43: | /** |
| 44: | * Advance function for change the behavior of app |
| 45: | */ |
| 46: | public function processEvent() {} |
| 47: | /** |
| 48: | * Assign Default TempFile to App for render |
| 49: | * @param \Sphp\tools\TempFile $obj |
| 50: | */ |
| 51: | public function setTempFile($obj) {} |
| 52: | /** |
| 53: | * Get Current TempFile assign to app for render |
| 54: | * @return \Sphp\tools\TempFile |
| 55: | */ |
| 56: | public function getTempFile() {} |
| 57: | /** |
| 58: | * Rendering Permission to default assigned TempFile |
| 59: | */ |
| 60: | public function showTempFile() {} |
| 61: | /** |
| 62: | * Disable Rendering Permission to default assigned TempFile |
| 63: | */ |
| 64: | public function showNotTempFile() {} |
| 65: | /** |
| 66: | * Set default table of Database to Sphp\Page object and this application. |
| 67: | * This information is important for controls and other database users objects. |
| 68: | * @param string $dbtable |
| 69: | */ |
| 70: | public function setTableName($dbtable) {} |
| 71: | /** |
| 72: | * get default database table assigned to application |
| 73: | * @return string |
| 74: | */ |
| 75: | public function getTableName() {} |
| 76: | /** |
| 77: | * get controller event name trigger by browser |
| 78: | * @return string |
| 79: | */ |
| 80: | public function getEvent() {} |
| 81: | /** |
| 82: | * get controller event parameter post by browser |
| 83: | * @return string |
| 84: | */ |
| 85: | public function getEventParameter() {} |
| 86: | /** |
| 87: | * override this event handler in your application to handle it. |
| 88: | * trigger when application start |
| 89: | */ |
| 90: | public function onstart() {} |
| 91: | /** |
| 92: | * override this event handler in your application to handle it. |
| 93: | * trigger when application finish process of default TempFile |
| 94: | */ |
| 95: | public function onready() {} |
| 96: | /** |
| 97: | * override this event handler in your application to handle it. |
| 98: | * trigger when application initialize TempFile Object |
| 99: | */ |
| 100: | public function ontempinit($tempobj) {} |
| 101: | /** |
| 102: | * override this event handler in your application to handle it. |
| 103: | * trigger when application start process on TempFile Object |
| 104: | */ |
| 105: | public function ontempprocess($tempobj) {} |
| 106: | /** Inbuilt Event |
| 107: | * override this event handler in your application to handle it. |
| 108: | * trigger when browser get (url=index-delete.html) |
| 109: | * where index is controller of application and application path is in reg.php file |
| 110: | */ |
| 111: | public function page_delete() {} |
| 112: | /** Inbuilt Event |
| 113: | * override this event handler in your application to handle it. |
| 114: | * trigger when browser get (url=index-view-19.html) |
| 115: | * where index is controller of application and application path is in reg.php file |
| 116: | * view = event name |
| 117: | * 19 = recid of database table or any other value. |
| 118: | */ |
| 119: | public function page_view() {} |
| 120: | /** Inbuilt Event |
| 121: | * override this event handler in your application to handle it. |
| 122: | * trigger when browser post form (url=index.html) |
| 123: | * where index is controller of application and application path is in reg.php file |
| 124: | */ |
| 125: | public function page_submit() {} |
| 126: | /** Inbuilt Event |
| 127: | * override this event handler in your application to handle it. |
| 128: | * trigger when browser post form (url=index.html) as new form |
| 129: | * where index is controller of application and application path is in reg.php file |
| 130: | */ |
| 131: | public function page_insert() {} |
| 132: | /** Inbuilt Event |
| 133: | * override this event handler in your application to handle it. |
| 134: | * trigger when browser post form (url=index.html) as filled form |
| 135: | * from database with view_data function |
| 136: | * where index is controller of application and application path is in reg.php file |
| 137: | */ |
| 138: | public function page_update() {} |
| 139: | /** Inbuilt Event |
| 140: | * override this event handler in your application to handle it. |
| 141: | * trigger when browser get (url=index.html) first time |
| 142: | * where index is controller of application and application path is in reg.php file |
| 143: | */ |
| 144: | public function page_new() {} |
| 145: | /** Inbuilt Event |
| 146: | * override this event handler in your application to handle it. |
| 147: | * trigger when application run after ready event and before trigger any event handler |
| 148: | */ |
| 149: | public function onrun() {} |
| 150: | /** Inbuilt Event |
| 151: | * override this event handler in your application to handle it. |
| 152: | * trigger when application render after run TempFile but before start master |
| 153: | * file process. You can't manage TempFile output here but you can replace TempFile |
| 154: | * output in SphpBase::$dynData or change master file or add front place for master filepath |
| 155: | */ |
| 156: | public function onrender() {} |
| 157: | /** |
| 158: | * Advance function for change the behavior of app |
| 159: | */ |
| 160: | public function run() {} |
| 161: | /** |
| 162: | * Advance function for change the behavior of app |
| 163: | */ |
| 164: | public function render() {} |
| 165: | /** |
| 166: | * set path of master design file name |
| 167: | * @param string $masterFile |
| 168: | */ |
| 169: | public function setMasterFile($masterFile) {} |
| 170: | /** |
| 171: | * Set which user can access this application. Default user is GUEST. |
| 172: | * You can set session variable in login app |
| 173: | * SphpBase::sphp_request()->session('logType','ADMIN'); |
| 174: | * If user is not login with specific type then application exit and |
| 175: | * redirect according to the getWelcome function in comp.php |
| 176: | * @param string $authenticates <p> |
| 177: | * comma separated list of string. Example:- getAuthenticate("GUEST,ADMIN") or getAuthenticate("ADNIN") |
| 178: | * </p> |
| 179: | */ |
| 180: | public function getAuthenticate($authenticates) {} |
| 181: | /** |
| 182: | * Check if user has session secure url. This application can't work with cross session. |
| 183: | * Every app has unique url and expired with end of session. |
| 184: | */ |
| 185: | public function getSesSecurity() {} |
| 186: | } |
| 187: | } |
| 188: |