| 1: | <?php |
| 2: | /** |
| 3: | * SphpPermission class for manage permissions system |
| 4: | */ |
| 5: | class SphpPermission { |
| 6: | /** |
| 7: | * Set Permissions List as Associate Array |
| 8: | * @param array $arrP <p> |
| 9: | * $arrp = array("perm1" => true,"perm2" => true); |
| 10: | * perm1 can be like index-view or allview or any word you want to use as |
| 11: | * permission identification. This permissions can be manage content in front file or |
| 12: | * enable disable Gate features or menus. |
| 13: | * </p> |
| 14: | */ |
| 15: | public function setPermissions($arrP) {} |
| 16: | /** |
| 17: | * Check is permission ID exists |
| 18: | * @param string $permission |
| 19: | * @return boolean |
| 20: | */ |
| 21: | public function hasPermission($permission) {} |
| 22: | /** |
| 23: | * Check Single or multi permissions |
| 24: | * @param string $permissions <p> |
| 25: | * single or coma separated permissions list as string |
| 26: | * </p> |
| 27: | * @return boolean |
| 28: | */ |
| 29: | public function isPermission($permissions) {} |
| 30: | /** |
| 31: | * Authorise user if permission is available otherwise Gate will be exit |
| 32: | * and redirected by according to getWelcome function in comp.php file in project folder |
| 33: | * @param string $perm <p> |
| 34: | * string or comma separated string list |
| 35: | * </p> |
| 36: | * @return boolean |
| 37: | */ |
| 38: | public function getAuthenticate($perm = "") {} |
| 39: | } |
| 40: | class SphpBase { |
| 41: | public static $dynData = null; |
| 42: | public static $stmycache = null; |
| 43: | /** |
| 44: | * Get Engine |
| 45: | * @static |
| 46: | * @return \Sphp\Engine |
| 47: | */ |
| 48: | public static function engine() {} |
| 49: | /** |
| 50: | * Get Router |
| 51: | * @static |
| 52: | * @return \Sphp\core\Router |
| 53: | */ |
| 54: | public static function sphp_router() {} |
| 55: | /** |
| 56: | * Get SphpAPI |
| 57: | * @static |
| 58: | * @return \Sphp\core\SphpAPI |
| 59: | */ |
| 60: | public static function sphp_api() {} |
| 61: | /** |
| 62: | * Get Request |
| 63: | * @static |
| 64: | * @return \Sphp\core\Request |
| 65: | */ |
| 66: | public static function sphp_request() {} |
| 67: | /** |
| 68: | * Get Response |
| 69: | * @static |
| 70: | * @return \Sphp\core\Response |
| 71: | */ |
| 72: | public static function sphp_response() {} |
| 73: | /** |
| 74: | * Get Session |
| 75: | * @static |
| 76: | * @return \Sphp\core\Session |
| 77: | */ |
| 78: | public static function sphp_session() {} |
| 79: | /** |
| 80: | * Get Settings |
| 81: | * @static |
| 82: | * @return \Sphp\core\Settings |
| 83: | */ |
| 84: | public static function sphp_settings() {} |
| 85: | /** |
| 86: | * Get SphpPermission |
| 87: | * @static |
| 88: | * @return \SphpPermission |
| 89: | */ |
| 90: | public static function sphp_permissions() {} |
| 91: | /** |
| 92: | * Get JSServer |
| 93: | * @static |
| 94: | * @return \Sphp\kit\JSServer |
| 95: | */ |
| 96: | public static function JSServer() {} |
| 97: | /** |
| 98: | * Get JQuery |
| 99: | * @static |
| 100: | * @return \Sphp\kit\JQuery |
| 101: | */ |
| 102: | public static function JQuery() {} |
| 103: | /** |
| 104: | * Get Page Object |
| 105: | * @static |
| 106: | * @return \Sphp\kit\Page |
| 107: | */ |
| 108: | public static function page() {} |
| 109: | /** |
| 110: | * Set Page Object |
| 111: | * @static |
| 112: | * @param \Sphp\kit\Page $p |
| 113: | */ |
| 114: | public static function set_page($p) {} |
| 115: | /** |
| 116: | * Get getAppOutput |
| 117: | * @static |
| 118: | */ |
| 119: | public static function getAppOutput() {} |
| 120: | /** |
| 121: | * Get DebugProfiler |
| 122: | * @static |
| 123: | * @return \Sphp\core\DebugProfiler |
| 124: | */ |
| 125: | public static function debug() {} |
| 126: | /** |
| 127: | * Get DB Engine |
| 128: | * @static |
| 129: | * @return \MySQL |
| 130: | */ |
| 131: | public static function dbEngine() {} |
| 132: | /** |
| 133: | * set DB Engine |
| 134: | * @static |
| 135: | * @param \MySQL $d |
| 136: | */ |
| 137: | public static function set_dbEngine($d) {} |
| 138: | /** |
| 139: | * Get JS Manager |
| 140: | * @static |
| 141: | * @return \SphpJsM |
| 142: | */ |
| 143: | public static function sphpJsM() {} |
| 144: | /** |
| 145: | * Advance Function, No Use |
| 146: | * @static |
| 147: | * @ignore |
| 148: | */ |
| 149: | /** |
| 150: | * Advance Function, No Use |
| 151: | * @static |
| 152: | * @ignore |
| 153: | */ |
| 154: | public static function init() {} |
| 155: | /** |
| 156: | * Advance Function, No Use |
| 157: | * @static |
| 158: | * @ignore |
| 159: | */ |
| 160: | public static function setReady($engine) {} |
| 161: | /** |
| 162: | * Advance Function, No Use |
| 163: | * @static |
| 164: | * @ignore |
| 165: | */ |
| 166: | public static function refreshCacheEngine() {} |
| 167: | /** |
| 168: | * Advance Function, No Use |
| 169: | * @static |
| 170: | * @ignore |
| 171: | */ |
| 172: | public static function addNewRequest() {} |
| 173: | } |
| 174: | class SphpCodeBlock{ |
| 175: | /** |
| 176: | * Add Code Block for FrontFile. use runcb="true" and sphp-cb-blockName on tag |
| 177: | * @param string $name Name of code block |
| 178: | * @param function $callback function($element,$args,$lstOther_CB) |
| 179: | * $element=NodeTag object, $args=list of arguments, $lstOther_CB=List of other Code Blocks |
| 180: | * Gately on this element |
| 181: | * @param array $para add css,html for simple code block |
| 182: | * Values can pass as associative array:- |
| 183: | * class = CSS class Attribute |
| 184: | * pclass = parent tag css classes |
| 185: | * pretag = pre tag html |
| 186: | * posttag = post tag html |
| 187: | * innerpretag = tag start inner html |
| 188: | * innerposttag = tag end inner html |
| 189: | * documentation = Help details about code block, also display in VS Code and other editors. |
| 190: | */ |
| 191: | public static function addCodeBlock($name,$callback=null,$para=[]){} |
| 192: | public static function getCodeBlocks(){} |
| 193: | public static function getCodeBlock($name){} |
| 194: | } |
| 195: | if (!$blnPreLibCache) { |
| 196: | if ($blnPreLibLoad) { |
| 197: | include_once("{$libpath}/libsphp1.php"); |
| 198: | } else { |
| 199: | include_once("{$libpath}/global/libloader.php"); |
| 200: | } |
| 201: | } |
| 202: | include_once("{$slibpath}/comp/SphpJsM.php"); |
| 203: | if ($debugmode > 0) { |
| 204: | ini_set("display_errors", 1); |
| 205: | ini_set('display_startup_errors', 1); |
| 206: | error_reporting(E_ALL); |
| 207: | } |
| 208: | /** |
| 209: | * Extra autoload registered function |
| 210: | * @param string $name |
| 211: | */ |
| 212: | function loadSphpLibClass($name) {} |
| 213: | spl_autoload_register("loadSphpLibClass"); |
| 214: | function runSartajPHPEngine(){} |
| 215: |