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