| 1: | <?php |
| 2: | namespace Sphp\core { |
| 3: | final class SphpAPI { |
| 4: | public $errStatus = false; |
| 5: | /** |
| 6: | * Advance function, Internal use |
| 7: | * @ignore |
| 8: | */ |
| 9: | /** |
| 10: | * Advance function, Internal use |
| 11: | * @ignore |
| 12: | */ |
| 13: | public function init() {} |
| 14: | /** |
| 15: | * Register TempFile |
| 16: | * @param string $key name of tempfile |
| 17: | * @param \Sphp\tools\TempFile $obj TempFile Object |
| 18: | */ |
| 19: | public function registerTempFile($key, $obj) {} |
| 20: | /** |
| 21: | * Add Property into property bag. It is good to use, rather then global variables |
| 22: | * @param string $name Name for identification |
| 23: | * @param mixed $obj Any valid PHP Object or Data Type |
| 24: | */ |
| 25: | public function addProp($name, $obj) {} |
| 26: | /** |
| 27: | * Read proprty from property bag |
| 28: | * @param string $name Name for identification |
| 29: | * @return string|mixed |
| 30: | */ |
| 31: | public function getProp($name) {} |
| 32: | /** |
| 33: | * Advance Function, Internal use |
| 34: | * Add Component |
| 35: | * @param string $comp Name for identification |
| 36: | * @param \Sphp\tools\Control $obj Control Object |
| 37: | */ |
| 38: | public function addComponent($comp, $obj) {} |
| 39: | /** |
| 40: | * Advance Function, Internal use |
| 41: | * Add Component for Database bound |
| 42: | * @param string $tempname tempfile name for identification as key |
| 43: | * @param string $comp Name for identification as key |
| 44: | * @param \Sphp\tools\Control $obj Control Object |
| 45: | */ |
| 46: | public function addComponentDB($tempname, $comp, $obj) {} |
| 47: | /** |
| 48: | * Advance Function, Internal use |
| 49: | * Get Components List for Database bound |
| 50: | * @return \Sphp\tools\Control |
| 51: | */ |
| 52: | public function getComponentsDB() {} |
| 53: | /** |
| 54: | * Get Component if exist in List |
| 55: | * @param string $comp Component Name for identification |
| 56: | * @return \Sphp\tools\Control|null |
| 57: | */ |
| 58: | public function isComponent($comp) {} |
| 59: | /** |
| 60: | * Add menu in menu list <p> |
| 61: | * SphpBase::sphp_api()->addMenu("Live Chat",getEventURL("page","chat","index"),"fa fa-commenting","root",false,"index-chat-view"); |
| 62: | * SphpBase::sphp_api()->addMenu("Debug", "","fa fa-home","root"); |
| 63: | * SphpBase::sphp_api()->addMenuLink("Debug", 'javascript: debugApp();',"","Debug",true,"","f7"); |
| 64: | * These all features are depend on renderer, customize renderer may be not support all fetaures. |
| 65: | * </p> |
| 66: | * @param string $text name of menu |
| 67: | * @param string $link Optional URL show in html tag |
| 68: | * @param string $icon Optional CSS class of icon |
| 69: | * @param string $parent Optional parent name for menu as sub menu, default is root |
| 70: | * @param boolean $ajax Optional if true then use AJAX request |
| 71: | * @param string $roles Optional <p> |
| 72: | * comma separtaed list for user Authentication types or permissions, if match then menu display in HTML code |
| 73: | * </p> |
| 74: | * @param string $akey Optional keyboard shortcut <p> |
| 75: | * SphpBase::sphp_api()->addMenuLink("Debug", 'javascript: debugApp();',"","Debug",true,"","f7"); |
| 76: | * f7 is keyboard shortcut. v,alt+shift = press v + alt + shift key |
| 77: | * </p> |
| 78: | * @param array $settings Optional <p> |
| 79: | * Extra data pass to renderer as associative array |
| 80: | * </p> |
| 81: | */ |
| 82: | public function addMenu($text, $link = "", $icon = "", $parent = "root", $ajax = false, $roles = "", $akey = "", $settings = null) {} |
| 83: | /** |
| 84: | * Add menu link in menu <p> |
| 85: | * SphpBase::sphp_api()->addMenu("Live Chat",getEventURL("page","chat","index"),"fa fa-commenting","root",false,"index-chat-view"); |
| 86: | * SphpBase::sphp_api()->addMenu("Debug", "","fa fa-home","root"); |
| 87: | * SphpBase::sphp_api()->addMenuLink("Debug", 'javascript: debugApp();',"","Debug",true,"","f7"); |
| 88: | * These all features are depend on renderer, customize renderer may be not support all fetaures. |
| 89: | * </p> |
| 90: | * @param string $text name of menulink |
| 91: | * @param string $link Optional URL show in html tag |
| 92: | * @param string $icon Optional CSS class of icon |
| 93: | * @param string $parent Optional parent name for menulink, default is root |
| 94: | * @param boolean $ajax Optional if true then use AJAX request |
| 95: | * @param string $roles Optional <p> |
| 96: | * comma separtaed list for user Authentication types or permissions, if match then menulink display in HTML code |
| 97: | * </p> |
| 98: | * @param string $akey Optional keyboard shortcut <p> |
| 99: | * SphpBase::sphp_api()->addMenuLink("Debug", 'javascript: debugApp();',"","Debug",true,"","f7"); |
| 100: | * f7 is keyboard shortcut. v,alt+shift = press v + alt + shift key |
| 101: | * </p> |
| 102: | * @param array $settings Optional <p> |
| 103: | * Extra data pass to renderer as associative array |
| 104: | * </p> |
| 105: | */ |
| 106: | public function addMenuLink($text, $link = "", $icon = "", $parent = "root", $ajax = false, $roles = "", $akey = "", $settings = null) {} |
| 107: | /** |
| 108: | * Ban Menu from list, it will not display |
| 109: | * @param string $text menu name |
| 110: | * @param string $parent Optional menu parent |
| 111: | */ |
| 112: | public function banMenu($text, $parent = "root") {} |
| 113: | /** |
| 114: | * Ban Menulink from list, it will not display |
| 115: | * @param string $text menu name |
| 116: | * @param string $parent Optional menu parent |
| 117: | */ |
| 118: | public function banMenuLink($text, $parent = "root") {} |
| 119: | /** |
| 120: | * Get All Menu List from parent menu |
| 121: | * @param string $parent Optional menu parent |
| 122: | * @return array|null |
| 123: | */ |
| 124: | public function getMenuList($parent = "root") {} |
| 125: | /** |
| 126: | * Get All Menulink List from parent menu |
| 127: | * @param string $parent Optional menu parent |
| 128: | * @return array|null |
| 129: | */ |
| 130: | public function getMenuLinkList($parent = "root") {} |
| 131: | /** |
| 132: | * Cache a request URL if it doesn't need processing. |
| 133: | * SphpBase::sphp_api()->addCacheList("index",100) |
| 134: | * Cache index application with all events and refersh interval is 100 seconds. Cache will update the index app with |
| 135: | * interval of 100 seconds. |
| 136: | * @param string $url match for cache like cache "index" or "index-page" |
| 137: | * @param int $sec Expiry Time in seconds -1 mean never expire |
| 138: | * @param string $type <p> |
| 139: | * type = Default controller mean url has controller name only and response to all events basis on this controller |
| 140: | * type = ce mean controller-event cache only that event |
| 141: | * type = cep mean controller-event-evtp cache only that event with that parameter |
| 142: | * type = e event on any application will be use cache |
| 143: | * </p> |
| 144: | */ |
| 145: | public function addCacheList($url, $sec = 0, $type = "controller") {} |
| 146: | /** |
| 147: | * Check if URL register with cache list |
| 148: | * @param string $url |
| 149: | * @return boolean |
| 150: | */ |
| 151: | public function isRegisterCacheItem($url) {} |
| 152: | /** |
| 153: | * Read Cache Item from Cache List |
| 154: | * @param string $url |
| 155: | * @return array |
| 156: | */ |
| 157: | public function getCacheItem($url) {} |
| 158: | /** |
| 159: | * Register Application with an controller |
| 160: | * @param string $ctrl Name of controller assigned to application |
| 161: | * @param string $apppath <p> |
| 162: | * Attach application path. |
| 163: | * Path end with .php is module application |
| 164: | * and path end with .app is class application. |
| 165: | * Filename should match with class name |
| 166: | * </p> |
| 167: | * @param string $s_namespace if class application is under a name space |
| 168: | * @param string $permtitle Title Display in Permission List |
| 169: | * @param array $permlist Create Permissions List for application |
| 170: | */ |
| 171: | public function registerApp($ctrl, $apppath, $s_namespace = "",$permtitle="",$permlist=null) {} |
| 172: | /** |
| 173: | * Check application is registered |
| 174: | * @param string $ctrl |
| 175: | * @return boolean |
| 176: | */ |
| 177: | public function isRegisterApp($ctrl) {} |
| 178: | /** |
| 179: | * Get Application Details that is registered with controller name $ctrl |
| 180: | * @param string $ctrl |
| 181: | * @return array |
| 182: | */ |
| 183: | public function getAppPath($ctrl) {} |
| 184: | /** |
| 185: | * Get List of Registered Applications |
| 186: | * @return array |
| 187: | */ |
| 188: | public function getRegisteredApps() {} |
| 189: | /** |
| 190: | * Get Controller name that has matched apppath with $appfilepath |
| 191: | * @param string $appfilepath |
| 192: | * @return string|null |
| 193: | */ |
| 194: | public function getAppCtrl($appfilepath) {} |
| 195: | /** |
| 196: | * Get Root folder path of a path. |
| 197: | * It may be inside res folder or project folder. |
| 198: | * Return SphpBase::sphp_settings()->php_path or PROJ_PATH |
| 199: | * @param string $val path to check |
| 200: | * @return string |
| 201: | */ |
| 202: | public function getRootPath($val) {} |
| 203: | /** |
| 204: | * Convert URL to local server filepath |
| 205: | * $a = SphpBase::sphp_api->respathToFilepath("../res/jslib/twitter/bootstarp4/main.css") |
| 206: | * @param string $fileurl |
| 207: | * @return array pathinfo,directory,url path,filepath |
| 208: | */ |
| 209: | public function respathToFilepath($fileurl) {} |
| 210: | /** |
| 211: | * Convert filepath to URL path for browser |
| 212: | * $a = SphpBase::sphp_api->filepathToRespaths("apps/chat/index.app") |
| 213: | * @param string $filepath |
| 214: | * @return array pathinfo,directory,url path,filepath |
| 215: | */ |
| 216: | public function filepathToRespaths($filepath) {} |
| 217: | /** |
| 218: | * Run Class type Application |
| 219: | * @param string $path |
| 220: | */ |
| 221: | public function runApp($path) {} |
| 222: | /** |
| 223: | * Create Application object from $path as filepath |
| 224: | * @param string $path |
| 225: | * @return \Sphp\core\formname |
| 226: | */ |
| 227: | public function getAppObject($path) {} |
| 228: | /** |
| 229: | * |
| 230: | * @param string $filepath App Path |
| 231: | * @param boolean $setEnv Default true = set apppath variable |
| 232: | * @return type |
| 233: | */ |
| 234: | public function getRegisterAppClass($filepath, $setEnv = true) {} |
| 235: | /** |
| 236: | * Read Global Variable |
| 237: | * @param string $varname |
| 238: | * @return mixed |
| 239: | */ |
| 240: | public function getGlobal($varname) {} |
| 241: | /** |
| 242: | * Write Global Variable |
| 243: | * @param string $varname |
| 244: | * @param mixed $val value to set |
| 245: | */ |
| 246: | public function setGlobal($varname, $val) {} |
| 247: | /** |
| 248: | * Set Error Status Flag. |
| 249: | * @param string $msg No Use |
| 250: | */ |
| 251: | public function raiseError($msg) {} |
| 252: | /** |
| 253: | * Print Message with end Line(br) in HTML |
| 254: | * @param string $str |
| 255: | */ |
| 256: | public function println($str) {} |
| 257: | /** |
| 258: | * Convert Bool to Int |
| 259: | * @param boolean $boolean1 |
| 260: | * @return int |
| 261: | */ |
| 262: | public function boolToInt($boolean1) {} |
| 263: | /** |
| 264: | * Convert Bool to Yes,No |
| 265: | * @param boolean $boolean1 |
| 266: | * @return string |
| 267: | */ |
| 268: | public function boolToYesNo($boolean1) {} |
| 269: | /** |
| 270: | * Convert Bool to String True,False |
| 271: | * @param boolean $boolean1 |
| 272: | * @return string |
| 273: | */ |
| 274: | public function boolToString($boolean1) {} |
| 275: | /** |
| 276: | * Convert True,False to Bool |
| 277: | * @param string $str |
| 278: | * @return boolean |
| 279: | */ |
| 280: | public function stringToBool($str) {} |
| 281: | /** |
| 282: | * Search exact match of Needle in array values as case insensitive |
| 283: | * @param string $needle |
| 284: | * @param array $haystack |
| 285: | * @return boolean |
| 286: | */ |
| 287: | public function in_arrayi($needle, $haystack) {} |
| 288: | /** |
| 289: | * Search Needle as array match anywhere in haystack as case insensitive |
| 290: | * @param string $haystack |
| 291: | * @param array $needle |
| 292: | * @return boolean |
| 293: | */ |
| 294: | public function array_search_str( $haystack,$needle) {} |
| 295: | /** |
| 296: | * Search Needle match anywhere in haystack and return line number |
| 297: | * @param string $haystack |
| 298: | * @param string $needle |
| 299: | * @return int line number |
| 300: | */ |
| 301: | public function find_line_number($haystack,$needle) {} |
| 302: | /** |
| 303: | * Change Case of Values in array |
| 304: | * @param array $arr |
| 305: | * @param string $case1 Default strtolower other value = strtoupper |
| 306: | * @return array |
| 307: | */ |
| 308: | public function array_change_val_case($arr, $case1 = "") {} |
| 309: | /** |
| 310: | * Search first match of Needle in array as case insensitive |
| 311: | * @param type $needle |
| 312: | * @param type $haystack |
| 313: | * @return int|string|false return key |
| 314: | */ |
| 315: | public function array_search_i($needle, $haystack) {} |
| 316: | /** |
| 317: | * Return IP Value of Client |
| 318: | * @return String <br> |
| 319: | * @author Sartaj Singh |
| 320: | * |
| 321: | */ |
| 322: | public function getIP() {} |
| 323: | /** |
| 324: | * Return Client Details IP, Request method, url,protocol,referer,browser |
| 325: | * ret = SphpBase::sphp_api()->getGuestDetails(); |
| 326: | * echo ret["ip"]; <br> |
| 327: | * echo ret["method"] ;<br> |
| 328: | * echo ret["uri"] ;<br> |
| 329: | * echo ret["protocol"];<br> |
| 330: | * echo ret["referer"] ;<br> |
| 331: | * echo ret["agent"] ;<br> |
| 332: | * @author Sartaj Singh |
| 333: | * @return array <br> |
| 334: | * |
| 335: | */ |
| 336: | public function getGuestDetails() {} |
| 337: | /** |
| 338: | * Return Client location: city country |
| 339: | * echo ipDetail["city"];<br> |
| 340: | * echo ipDetail["country"];<br> |
| 341: | * echo ipDetail["country_code"];<br> |
| 342: | * this function use http://hostip.info/ website api for conversion |
| 343: | * @author Sartaj Singh |
| 344: | * @return array <br> |
| 345: | * |
| 346: | */ |
| 347: | public function getIPDetail() {} |
| 348: | /** |
| 349: | * Check if string is a number |
| 350: | * @param string $val |
| 351: | * @param string $datatype default FLOAT other value is INT |
| 352: | * @return boolean |
| 353: | */ |
| 354: | public function is_valid_num($val, $datatype = "FLOAT") {} |
| 355: | public function getEngine() {} |
| 356: | /** |
| 357: | * Check valid email format |
| 358: | * @param string $email |
| 359: | * @return boolean |
| 360: | */ |
| 361: | public function is_valid_email($email) {} |
| 362: | /** |
| 363: | * Generate JS Array code for PHP Array |
| 364: | * @param string $jsVarName JS Array variable name in code |
| 365: | * @param array $phpArray |
| 366: | * @return string |
| 367: | */ |
| 368: | public function getJSArray($jsVarName, $phpArray, $novar=false) {} |
| 369: | /** |
| 370: | * Generate JS Associative Array code for PHP Array |
| 371: | * @param string $jsVarName JS Associative Array variable name in code |
| 372: | * @param array $phpArray |
| 373: | * @return string |
| 374: | */ |
| 375: | public function getJSArrayAss($jsVarName, $phpArray, $novar=false) {} |
| 376: | /** |
| 377: | * Convert HTML string into JS string |
| 378: | * @param string $strHTML |
| 379: | * @return string |
| 380: | */ |
| 381: | public function HTMLToJS($strHTML) {} |
| 382: | /** |
| 383: | * Get SartajPHP Version |
| 384: | * @return String |
| 385: | */ |
| 386: | public function getSartajPHP() {} |
| 387: | public function getSartajPHPVer() {} |
| 388: | public function setServLanguage($val) {} |
| 389: | public function getServLanguage() {} |
| 390: | public function isDebugMode() {} |
| 391: | /** |
| 392: | * Get string from php content |
| 393: | * @param type $filepath |
| 394: | * @return string |
| 395: | */ |
| 396: | public function getDynamicContent($filepath,$caller=null) {} |
| 397: | /** |
| 398: | * Minify PHP code string |
| 399: | * @param string $filedata |
| 400: | * @return string |
| 401: | */ |
| 402: | public function minifyPHP($filedata) {} |
| 403: | /** |
| 404: | * Minify CSS code string |
| 405: | * @param string $filedata |
| 406: | * @return string |
| 407: | */ |
| 408: | public function minifyCSS($filedata) {} |
| 409: | /** |
| 410: | * Minify HTML code string |
| 411: | * @param string $filedata |
| 412: | * @return string |
| 413: | */ |
| 414: | public function minifyHTML($filedata) {} |
| 415: | /** |
| 416: | * Minify JS code string |
| 417: | * @param string $filedata |
| 418: | * @return string |
| 419: | */ |
| 420: | public function minifyJS($filedata) {} |
| 421: | /** |
| 422: | * Safe write file |
| 423: | * @param string $filepath file path |
| 424: | * @param string|mixed $data content to write in file |
| 425: | * @return int| Exception |
| 426: | */ |
| 427: | public function safeWriteFile($filepath, $data) {} |
| 428: | /** |
| 429: | * Trigger Error |
| 430: | * SphpBase::sphp_api()->triggerError("Couldn't get any result from database", E_USER_NOTICE,debug_backtrace()) |
| 431: | * @param type $msg Error Message |
| 432: | * @param type $errType Default E_USER_NOTICE |
| 433: | * @param array $debug_array |
| 434: | */ |
| 435: | public function triggerError($msg, $errType, $debug_array) {} |
| 436: | /** |
| 437: | * Advance Function, Internal use |
| 438: | * @param boolean $renderonce Default false |
| 439: | * @return string |
| 440: | */ |
| 441: | public function getrenderType($renderonce = false) {} |
| 442: | /** |
| 443: | * Add CSS, JS File Link for browser |
| 444: | * SphpBase::sphp_api()->addFileLink("temp/default/theme-black.css",true,"","","2.7") |
| 445: | * SphpBase::sphp_api()->addFileLink("temp/default/theme-black.js",false,"black1","js","2.7") |
| 446: | * @param string $fileURL URL for file |
| 447: | * @param boolean $renderonce Optional default false if true then file ignore in AJAX request |
| 448: | * @param string $filename Optional file identification key. default=filename in fileurl |
| 449: | * @param string $ext Optional default=file extension in fileurl |
| 450: | * @param string $ver Optional default=0 file version if any |
| 451: | * @param array $assets path for asset folders to copy with this file when distribute |
| 452: | * @param int $async Default=global file setting, 2=defer, 1= async and 0=default |
| 453: | */ |
| 454: | public function addFileLink($fileURL, $renderonce = false, $filename = "", $ext = "", $ver = "0",$assets=array(),$async=0) {} |
| 455: | /** |
| 456: | * Update CSS, JS File Link for browser |
| 457: | * SphpBase::sphp_api()->updateFileLink("temp/default/theme-black2.js",false,"black1","js","2.8") |
| 458: | * @param string $fileURL URL for file |
| 459: | * @param boolean $renderonce Optional default false if true then file ignore in AJAX request |
| 460: | * @param string $filename Optional file identification key. default=filename in fileurl |
| 461: | * @param string $ext Optional default=file extension in fileurl |
| 462: | * @param string $ver Optional default=0 file version if any |
| 463: | * @param array $assets path for asset folders to copy with this file when distribute |
| 464: | * @param int $async Default=global file setting, 2=defer, 1= async and 0=default |
| 465: | */ |
| 466: | public function updateFileLink($fileURL, $renderonce = false, $filename = "", $ext = "", $ver = "0",$assets=array(),$async=0) {} |
| 467: | /** |
| 468: | * Remove CSS, JS File Link for browser |
| 469: | * SphpBase::sphp_api()->removeFileLink("temp/default/theme-black2.js",false,"black1","js") |
| 470: | * @param string $fileURL URL for file |
| 471: | * @param boolean $renderonce Optional default false if true then file ignore in AJAX request |
| 472: | * @param string $filename Optional file identification key. default=filename in fileurl |
| 473: | * @param string $ext Optional default=file extension in fileurl |
| 474: | */ |
| 475: | public function removeFileLink($fileURL, $renderonce = false, $filename = "", $ext = "") {} |
| 476: | /** |
| 477: | * Insert HTML Tag into header section. |
| 478: | * SphpBase::sphp_api()->addFileLinkCode("f1",'<meta name="viewport" content="width=device-width, initial-scale=1" />') |
| 479: | * @param string $name Name as id |
| 480: | * @param string $code HTML link tag code |
| 481: | * @param boolean $renderonce Optional default false, true mean ignore in AJAX request |
| 482: | */ |
| 483: | public function addFileLinkCode($name, $code, $renderonce = false) {} |
| 484: | /** |
| 485: | * Check if filelink is set |
| 486: | * if(SphpBase::sphp_api()->issetFileLink("black1","js",false)){ |
| 487: | * // add more related files |
| 488: | * } |
| 489: | * @param string $filename |
| 490: | * @param string $ext |
| 491: | * @param boolean $renderonce Optional default false, true mean ignore in AJAX request |
| 492: | * @return boolean |
| 493: | */ |
| 494: | public function issetFileLink($filename, $ext, $renderonce = false) {} |
| 495: | public function getParentDirectory($path) {} |
| 496: | public function directoriesCreate($dirPath,$mod=0775,$owner=""){} |
| 497: | public function directoryCopy($src,$dst,$fixdst=""){} |
| 498: | /** |
| 499: | * Advance Function |
| 500: | * Distribute All Global JS Lib (render once=true) JS files. These |
| 501: | * Files will not load by AJAX. |
| 502: | * @param boolean $min Optional no use |
| 503: | * @param boolean $removeonly Optional if true then remove only links |
| 504: | * @param boolean $combine Optional if true then combine files |
| 505: | * @param string $distpath Optional Folder Path to copy files Default = cache |
| 506: | * @return string |
| 507: | */ |
| 508: | public function getDistGlobalJSFiles($min = false, $removeonly = false,$combine=true,$distpath="cache") {} |
| 509: | /** |
| 510: | * Advance Function |
| 511: | * Distribute All private files (render once=false) JS files. These |
| 512: | * Files can also load via AJAX |
| 513: | * @param boolean $min Optional no use |
| 514: | * @param boolean $removeonly Optional if true then remove only links |
| 515: | * @param boolean $combine Optional if true then combine files |
| 516: | * @param string $distpath Optional Folder Path to copy files Default = cache |
| 517: | * @return string |
| 518: | */ |
| 519: | public function getDistJSFiles($min = false, $removeonly = false,$combine=true,$distpath="cache") {} |
| 520: | /** |
| 521: | * Advance Function |
| 522: | * Distribute All css files |
| 523: | * @param boolean $min Optional no use |
| 524: | * @param boolean $removeonly Optional if true then remove only links no output |
| 525: | * @param boolean $combine Optional if true then combine files |
| 526: | * @param string $distpath Optional Folder Path to copy files Default = cache |
| 527: | * @return string |
| 528: | */ |
| 529: | public function getDistCSSFiles($min = false, $removeonly = false,$combine=true,$distpath="cache") {} |
| 530: | /** |
| 531: | * Combine All js and css filelinks and create combine file in $parentfolder folder. |
| 532: | * It also incudes addFileLink code for browser. |
| 533: | * Combines multiple css files into one may brake relative path. So you also |
| 534: | * need to copy assets manually into relative path. If |
| 535: | * you want to leave css links to combine but combine few css files then use combineFiles function to |
| 536: | * combine required css files. |
| 537: | * in Debug mode=2 it create fresh file on every request but in normal mode |
| 538: | * it checks file exist and create if not exist. |
| 539: | * @param string $parentfolder Optional Default=temp parent folder to save combo files |
| 540: | * @param boolean $addcss Optional Default=false create css css combo file |
| 541: | * @param boolean $force_overwrite Optional Default=false create fresh combo files |
| 542: | * |
| 543: | */ |
| 544: | public function getCombineFileLinks($parentfolder = "temp",$addcss=false,$force_overwrite=false) {} |
| 545: | /** |
| 546: | * Combine All files path into single file as $outputfilepath |
| 547: | * It willn't incudes addFileLink code for browser. You need to provide browser |
| 548: | * code if you need to send link to browser. |
| 549: | * Combines multiple css files into one may brake relative path. So you also |
| 550: | * need to copy assets manually into relative path. If |
| 551: | * in Debug mode=2 it create fresh file on every request but in normal mode |
| 552: | * it checks file exist and create if not exist. |
| 553: | * @param array $array_list List of files path |
| 554: | * @param string $outputfilepath Optional Default=temp/combo2.css Combine file path |
| 555: | * @param boolean $force_overwrite Optional Default=false create fresh combo files |
| 556: | * |
| 557: | */ |
| 558: | public function combineFiles($array_list,$outputfilepath = "temp/combo2.css",$force_overwrite=false) {} |
| 559: | /** |
| 560: | * Check JS Function Exist in Header Section |
| 561: | * @param string $funname Function name as id |
| 562: | * @param string $rendertype default=private other value is global |
| 563: | * @return boolean |
| 564: | */ |
| 565: | public function isHeaderJSFunctionExist($funname, $rendertype = "private") {} |
| 566: | /** |
| 567: | * Check JS Function Exist in Footer Section |
| 568: | * @param string $funname Function name as id |
| 569: | * @param string $rendertype default=private other value is global |
| 570: | * @return boolean |
| 571: | */ |
| 572: | public function isFooterJSFunctionExist($funname, $rendertype = "private") {} |
| 573: | /** |
| 574: | * Add JS Function header section. |
| 575: | * SphpBase::sphp_api()->addHeaderJSFunction("myfun","function myfun(){var v1 = 12;","}"); |
| 576: | * SphpBase::sphp_api()->addHeaderJSFunctionCode("myfun","code1","console.log(v1);"); |
| 577: | * @param string $funname Function name as id |
| 578: | * @param string $startcode |
| 579: | * @param string $endcode |
| 580: | * @param boolean $renderonce Optional default false, true mean ignore in AJAX request |
| 581: | */ |
| 582: | public function addHeaderJSFunction($funname, $startcode, $endcode, $renderonce = false) {} |
| 583: | /** |
| 584: | * Add JS Function footer section. |
| 585: | * SphpBase::sphp_api()->addFooterJSFunction("myfun","function myfun(){var v1 = 12;","}"); |
| 586: | * SphpBase::sphp_api()->addFooterJSFunctionCode("myfun","code1","console.log(v1);"); |
| 587: | * @param string $funname Function name as id |
| 588: | * @param string $startcode |
| 589: | * @param string $endcode |
| 590: | * @param boolean $renderonce Optional default false, true mean ignore in AJAX request |
| 591: | */ |
| 592: | public function addFooterJSFunction($funname, $startcode, $endcode, $renderonce = false) {} |
| 593: | /** |
| 594: | * Insert JS Code into JS Function in header section. |
| 595: | * SphpBase::sphp_api()->addHeaderJSFunctionCode("myfun","code1","console.log(v1);"); |
| 596: | * @param string $funname Function name as id |
| 597: | * @param type $name Code block name as id |
| 598: | * @param type $code JS code |
| 599: | * @param boolean $renderonce Optional default false, true mean ignore in AJAX request |
| 600: | */ |
| 601: | public function addHeaderJSFunctionCode($funname, $name, $code, $renderonce = false) {} |
| 602: | /** |
| 603: | * Insert JS Code into JS Function in header section. |
| 604: | * SphpBase::sphp_api()->addFooterJSFunctionCode("myfun","code1","console.log(v1);"); |
| 605: | * @param string $funname Function name as id |
| 606: | * @param type $name Code block name as id |
| 607: | * @param type $code JS code |
| 608: | * @param boolean $renderonce Optional default false, true mean ignore in AJAX request |
| 609: | */ |
| 610: | public function addFooterJSFunctionCode($funname, $name, $code, $renderonce = false) {} |
| 611: | /** |
| 612: | * Insert JS Code into header section |
| 613: | * SphpBase::sphp_api()->addHeaderJSCode("code1","console.log('test js code');"); |
| 614: | * @param type $name Code block name as id |
| 615: | * @param type $code JS code |
| 616: | * @param boolean $renderonce Optional default false, true mean ignore in AJAX request |
| 617: | */ |
| 618: | public function addHeaderJSCode($name, $code, $renderonce = false) {} |
| 619: | /** |
| 620: | * Insert CSS Code into header section |
| 621: | * SphpBase::sphp_api()->addHeaderCSS("code1","p{color: #FF88F6;}"); |
| 622: | * @param type $name Code block name as id |
| 623: | * @param type $code JS code |
| 624: | * @param boolean $renderonce Optional default false, true mean ignore in AJAX request |
| 625: | */ |
| 626: | public function addHeaderCSS($name, $code, $renderonce = false) {} |
| 627: | /** |
| 628: | * Insert JS Code into footer section |
| 629: | * SphpBase::sphp_api()->addFooterJSCode("code1","console.log('test js code');"); |
| 630: | * @param type $name Code block name as id |
| 631: | * @param type $code JS code |
| 632: | * @param boolean $renderonce Optional default false, true mean ignore in AJAX request |
| 633: | */ |
| 634: | public function addFooterJSCode($name, $code, $renderonce = false) {} |
| 635: | /** |
| 636: | * Advance Function, Internal use |
| 637: | * Generate all JS code for Header section |
| 638: | * @param boolean $htmltag Optional default true generate HTML tags |
| 639: | * @param boolean $global Optional default true generate render once code also |
| 640: | * @param int $blockJSCode Optional default 0 block JS code section Other values 1 and 2 |
| 641: | * @return string |
| 642: | */ |
| 643: | public function getHeaderJS($htmltag = true, $global = true, $blockJSCode = 0) {} |
| 644: | /** |
| 645: | * Filter String as JS String |
| 646: | * @param string $str |
| 647: | * @return string |
| 648: | */ |
| 649: | public function getFilterJSString($str) {} |
| 650: | /** |
| 651: | * Advance Function, Internal use |
| 652: | * Generate all JS code for Footer section |
| 653: | * @param boolean $htmltag Optional default true generate HTML tags |
| 654: | * @param boolean $global Optional default true generate render once code also |
| 655: | * @param int $blockJSCode Optional default 0 block JS code section Other values 1 and 2 |
| 656: | * @return string |
| 657: | */ |
| 658: | public function getFooterJS($htmltag = true, $global = true, $blockJSCode = 0) {} |
| 659: | /** |
| 660: | * Advance Function, Internal use |
| 661: | * Generate all HTML,CSS and JS code for Header Section |
| 662: | * @param boolean $htmltag Optional default true generate HTML tags |
| 663: | * @param boolean $global Optional default true generate render once code also |
| 664: | * @param int $blockJSCode Optional default 0 block JS code section Other values 1 and 2 |
| 665: | * @return string |
| 666: | */ |
| 667: | public function getHeaderHTML($htmltag = true, $global = true, $blockJSCode = 0) {} |
| 668: | /** |
| 669: | * Advance Function, Internal use |
| 670: | * Generate all HTML,CSS and JS code for Footer Section |
| 671: | * @param boolean $htmltag Optional default true generate HTML tags |
| 672: | * @param boolean $global Optional default true generate render once code also |
| 673: | * @param int $blockJSCode Optional default 0 block JS code section Other values 1 and 2 |
| 674: | * @return string |
| 675: | */ |
| 676: | public function getFooterHTML($htmltag = true, $global = true, $blockJSCode = 0) {} |
| 677: | /** |
| 678: | * Generate JS Code for console message. |
| 679: | * @param string $msg |
| 680: | * @param string $type Optional Default=log, it is same as JS console like info, error |
| 681: | * @return string |
| 682: | */ |
| 683: | public function consoleMsg($msg, $type = "log") {} |
| 684: | /** |
| 685: | * Print Error message in browser in HTML or JS code. This |
| 686: | * uses SphpBase::sphp_api()->setErr function for set error message. |
| 687: | * SphpBase::sphp_api()->getCheckErr() for check if there are any error. |
| 688: | * @param type $blnDontJS Optional Default false |
| 689: | * @return string |
| 690: | */ |
| 691: | public function traceError($blnDontJS = false) {} |
| 692: | /** |
| 693: | * |
| 694: | * Set Error Message and Error Flag, display for User of your project. |
| 695: | * This isn't PHP Language errors. It doesn't break your |
| 696: | * program execution. It is flag base error status which then you can |
| 697: | * use for decision making on server side or browser side. You can also set this flag |
| 698: | * from PHP exception and display error message in html tag rather then broken PHP |
| 699: | * output. Like validation error on TextBox Component will also set error flag on server and |
| 700: | * send back html error message with proper format and valid HTML. |
| 701: | * After this SphpBase::sphp_api()->getCheckErr() return true. |
| 702: | * @param string $name id for message error |
| 703: | * @param string $msg |
| 704: | */ |
| 705: | public function setErr($name, $msg) {} |
| 706: | /** |
| 707: | * SphpBase::sphp_api()->getCheckErr() for check if there are any error set by setErr. |
| 708: | * @return boolean |
| 709: | */ |
| 710: | public function getCheckErr() {} |
| 711: | /** |
| 712: | * Clear error flag set by setErr. |
| 713: | */ |
| 714: | public function unsetCheckErr() {} |
| 715: | /** |
| 716: | * |
| 717: | * @param string $name name as id of error |
| 718: | * @return string |
| 719: | */ |
| 720: | public function getErrMsg($name) {} |
| 721: | /** |
| 722: | * Print Error message in browser in HTML or JS code. This |
| 723: | * uses SphpBase::sphp_api()->setMsg function for set message. |
| 724: | * @param type $blnDontJS Optional Default false |
| 725: | * @return string |
| 726: | */ |
| 727: | public function traceMsg($blnDontJS = false) {} |
| 728: | /** |
| 729: | * Set Message for browser, display for User. |
| 730: | * @param string $name id for message |
| 731: | * @param string $msg |
| 732: | */ |
| 733: | public function setMsg($name, $msg) {} |
| 734: | /** |
| 735: | * |
| 736: | * @param string $name name as id of message |
| 737: | * @return string |
| 738: | */ |
| 739: | public function getMsg($name) {} |
| 740: | /** |
| 741: | * Print Developer Error message in browser in HTML or JS code. |
| 742: | * These errors are only available in debug mode and gives some extra informations |
| 743: | * to devloper about logical erros or help in debugging. |
| 744: | * Not php erros or exceptions whichbreak executions. |
| 745: | * These are just messages which can also comes from PHP errors. |
| 746: | * uses SphpBase::sphp_api()->setErrInner function for set error developer message. |
| 747: | * @param type $blnDontJS Optional Default false |
| 748: | * @return string |
| 749: | */ |
| 750: | public function traceErrorInner($blnDontJS = false) {} |
| 751: | /** |
| 752: | * Set Error Inner for developer |
| 753: | * @param string $name id for message |
| 754: | * @param string $msg |
| 755: | */ |
| 756: | public function setErrInner($name, $msg) {} |
| 757: | /** |
| 758: | * Read Inner Error Message |
| 759: | * @param string $name id for message |
| 760: | * @return string |
| 761: | */ |
| 762: | public function getErrMsgInner($name) {} |
| 763: | /** |
| 764: | * Set Front Place ignore if addFrontPlace don't initialize front place. |
| 765: | * It only reserve place. But not render in master without addFrontPlace. |
| 766: | * @param string $frontname name is id |
| 767: | * @param string $basepath DIR path |
| 768: | * @param string $secname Optional Default=left |
| 769: | * @param string $type Optional Default=TempFile |
| 770: | */ |
| 771: | public function setFrontPlacePath($frontname, $basepath, $secname = "left", $type = "TempFile") {} |
| 772: | /** |
| 773: | * Remove Front Place. |
| 774: | * @param string $frontname name is id |
| 775: | * @param string $secname Optional Default=left |
| 776: | */ |
| 777: | public function removeFrontPlace($frontname, $secname = "left") {} |
| 778: | /** |
| 779: | * Add and initialize front place. |
| 780: | * @param string $frontname name is id |
| 781: | * @param string $basepath DIR path |
| 782: | * @param string $secname Optional Default=left |
| 783: | * @param string $type Optional Default=TempFile It recogonise extensions front or php |
| 784: | */ |
| 785: | public function addFrontPlace($frontname, $filepath = "", $secname = "left", $type = "TempFile") {} |
| 786: | /** |
| 787: | * Get Front Place Object or path |
| 788: | * @param string $frontname name is id |
| 789: | * @param string $secname Optional Default=left |
| 790: | * @return \Sphp\tools\TempFile|string |
| 791: | */ |
| 792: | public function getFrontPlace($frontname, $secname = "left") {} |
| 793: | /** |
| 794: | * Run Front Place. Only Run TempFile not PHP. |
| 795: | * PHP file include only on render time. |
| 796: | * @param string $frontname name is id |
| 797: | * @param string $secname Optional Default=left |
| 798: | */ |
| 799: | public function runFrontPlace($frontname, $secname = "left") {} |
| 800: | /** |
| 801: | * Render Front Place. $frontname=dynData is reserved of center content of master. |
| 802: | * It will render dynData. |
| 803: | * @param string $frontname name is id |
| 804: | * @param string $secname Optional Default=left |
| 805: | */ |
| 806: | public function renderFrontPlace($frontname, $secname = "left") {} |
| 807: | /** |
| 808: | * Run All Front Places in a section |
| 809: | * @param string $secname Optional Default=left |
| 810: | */ |
| 811: | public function runFrontSection($secname = "left") {} |
| 812: | /** |
| 813: | * Add and Run All Front Places in a section. |
| 814: | * If any Front Place is not added but set then this will add automatically. |
| 815: | * @param string $secname Optional Default=left |
| 816: | */ |
| 817: | public function addrunFrontSection($secname = "left") {} |
| 818: | /** |
| 819: | * List of all front places which isn't render |
| 820: | * @param string $secname Optional Default=left |
| 821: | */ |
| 822: | public function listNotRenderFrontSection($secname = "left") {} |
| 823: | /** |
| 824: | * Render All Front Places in a section. |
| 825: | * @param string $secname Optional Default=left |
| 826: | */ |
| 827: | public function renderFrontSection($secname = "left") {} |
| 828: | /** |
| 829: | * Encrypt String |
| 830: | * @param string $strdata |
| 831: | * @param string $key Optional Default=sbrtyu837 |
| 832: | * @return string |
| 833: | */ |
| 834: | public function encrypt($strdata, $key = "sartajphp211") {} |
| 835: | /** |
| 836: | * Decrypt String |
| 837: | * @param string $strdata |
| 838: | * @param string $key Optional Default=sbrtyu837 |
| 839: | * @return string |
| 840: | */ |
| 841: | public function decrypt($strdata, $key = "sartajphp211") {} |
| 842: | /** |
| 843: | * Encrypt/Decrypt String. Use Hexadecimal key. Output Length is not big. |
| 844: | * Data recover is near to impossible if you lost key. |
| 845: | * @param string $str |
| 846: | * @param string $ky Optional Default=CD098AB |
| 847: | * @return string |
| 848: | */ |
| 849: | public function endec($str, $ky="CD098ABA") {} |
| 850: | public function rtClassMethod(\ReflectionClass &$refClass) {} |
| 851: | public function rtClassFile(\ReflectionClass &$refClass) {} |
| 852: | public function rtMethodSource(\ReflectionMethod &$method, &$arlines) {} |
| 853: | public function rtMethodParamFromString($strline, $parameters) {} |
| 854: | public function rtMethodParm(&$method) {} |
| 855: | public function rtClassConstantHelp($mainClass, \ReflectionClass &$reflector) {} |
| 856: | public function rtScopeDefinedHelp(&$arCls, &$arConst, &$arFun, &$arVars) {} |
| 857: | public function rtClassMethodInvoke(&$method, &$obj, $args = null) {} |
| 858: | public function rtFunctionInvoke($fun, $args = null) {} |
| 859: | public function rtClassMethodFromFileLine(\ReflectionClass &$reflector, $line) {} |
| 860: | public function rtClassMethodHelp($mainClass, \ReflectionClass &$reflector, &$arResult) {} |
| 861: | public function rtClassPropertyHelp($mainClass, $clsobj, \ReflectionClass &$reflector, &$arResult) {} |
| 862: | public function rtAutoCompleteFormat($objname, $helpdoc, $objtype, $code, $helptype) {} |
| 863: | public function executePHP($strPHPCode) {} |
| 864: | public function executePHPGlobal($strPHPCode) {} |
| 865: | public function executePHPFunc($strPHPCode) {} |
| 866: | public function consoleWrite($param) {} |
| 867: | public function consoleWriteln($param) {} |
| 868: | public function consoleReadln($msg) {} |
| 869: | public function consoleError($err) {} |
| 870: | } |
| 871: | } |
| 872: |