| Methods |
public
|
init()
Advance function, Internal use
Advance function, Internal use
|
#
|
public
|
registerFrontFile(string $key, FrontFile $obj)
Register FrontFile
Parameters
| $key |
name of frontfile
|
| $obj |
FrontFile Object
|
|
#
|
public
|
addProp(string $name, mixed $obj)
Add Property into property bag. It is good to use, rather then global variables
Add Property into property bag. It is good to use, rather then global variables
Parameters
| $name |
Name for identification
|
| $obj |
Any valid PHP Object or Data Type
|
|
#
|
public
|
getProp(string $name): string|mixed
Read proprty from property bag
Read proprty from property bag
Parameters
| $name |
Name for identification
|
|
#
|
public
|
addMenu(
string $text,
string $link = "",
string $icon = "",
string $parent = "root",
boolean $ajax = false,
string $roles = "",
string $akey = "",
array $settings = null,
)
Add menu in menu list <p>
SphpBase::sphp_api()->addMenu("Live Chat",getEventURL("page","chat","index"),"fa fa…
Add menu in menu list
SphpBase::sphp_api()->addMenu("Live Chat",getEventURL("page","chat","index"),"fa fa-commenting","root",false,"index-chat-view");
SphpBase::sphp_api()->addMenu("Debug", "","fa fa-home","root");
SphpBase::sphp_api()->addMenuLink("Debug", 'javascript: debugApp();',"","Debug",true,"","f7");
These all features are depend on renderer, customize renderer may be not support all fetaures.
Parameters
| $text |
name of menu
|
| $link |
Optional URL show in html tag
|
| $icon |
Optional CSS class of icon
|
| $parent |
Optional parent name for menu as sub menu, default is root
|
| $ajax |
Optional if true then use AJAX request
|
| $roles |
Optional
comma separated list for user Authentication types or permissions, if match then menu display in HTML code
|
| $akey |
Optional keyboard shortcut
SphpBase::sphp_api()->addMenuLink("Debug", 'javascript: debugApp();',"","Debug",true,"","f7");
f7 is keyboard shortcut. v,alt+shift = press v + alt + shift key
|
| $settings |
Optional
Extra data pass to renderer as associative array
|
|
#
|
public
|
addMenuLink(
string $text,
string $link = "",
string $icon = "",
string $parent = "root",
boolean $ajax = false,
string $roles = "",
string $akey = "",
array $settings = null,
)
Add menu link in menu <p>
SphpBase::sphp_api()->addMenu("Live Chat",getEventURL("page","chat","index"),"fa fa…
Add menu link in menu
SphpBase::sphp_api()->addMenu("Live Chat",getEventURL("page","chat","index"),"fa fa-commenting","root",false,"index-chat-view");
SphpBase::sphp_api()->addMenu("Debug", "","fa fa-home","root");
SphpBase::sphp_api()->addMenuLink("Debug", 'javascript: debugApp();',"","Debug",true,"","f7");
These all features are depend on renderer, customize renderer may be not support all fetaures.
Parameters
| $text |
name of menulink
|
| $link |
Optional URL show in html tag
|
| $icon |
Optional CSS class of icon
|
| $parent |
Optional parent name for menulink, default is root
|
| $ajax |
Optional if true then use AJAX request
|
| $roles |
Optional
comma separtaed list for user Authentication types or permissions, if match then menulink display in HTML code
|
| $akey |
Optional keyboard shortcut
SphpBase::sphp_api()->addMenuLink("Debug", 'javascript: debugApp();',"","Debug",true,"","f7");
f7 is keyboard shortcut. v,alt+shift = press v + alt + shift key
|
| $settings |
Optional
Extra data pass to renderer as associative array
|
|
#
|
public
|
banMenu(string $text, string $parent = "root")
Ban Menu from list, it will not display
Ban Menu from list, it will not display
Parameters
| $text |
menu name
|
| $parent |
Optional menu parent
|
|
#
|
public
|
banMenuLink(string $text, string $parent = "root")
Ban Menulink from list, it will not display
Ban Menulink from list, it will not display
Parameters
| $text |
menu name
|
| $parent |
Optional menu parent
|
|
#
|
public
|
getMenuList(string $parent = "root"): array|null
Get All Menu List from parent menu
Get All Menu List from parent menu
Parameters
| $parent |
Optional menu parent
|
|
#
|
public
|
getMenuLinkList(string $parent = "root"): array|null
Get All Menulink List from parent menu
Get All Menulink List from parent menu
Parameters
| $parent |
Optional menu parent
|
|
#
|
public
|
saveToCache(string $filename, array|object $data): boolean
Save Data in Cache
Parameters
| $filename |
give unique file name to identify
|
| $data |
Data to save in Cache
|
Returns
|
#
|
public
|
clearCache(string $filename): bool
Clear Data from Cache if exist. If $filename is * then it will clear all files from cache.
Clear Data from Cache if exist. If $filename is * then it will clear all files from cache.
Parameters
| $filename |
unique file name as identification
|
Returns
|
#
|
public
|
getFromCache(string $filename): array|object
Read Data from Cache if exist. It will not check isCacheExpired.
Read Data from Cache if exist. It will not check isCacheExpired.
Parameters
| $filename |
unique file name as identification
|
Returns
on error return empty array
|
#
|
public
|
readFromCache(string $filename, int $ttl): null|object
Read Data from Cache if exist and not expired, also check expiry
Read Data from Cache if exist and not expired, also check expiry
Parameters
| $filename |
unique file name as identification
|
| $ttl |
time in seconds, -1 mean never expired
|
Returns
on error or expired cache it will return null
|
#
|
public
|
isCacheExpired(string $filename, int $ttl): bool
Check Cache is Expired
Parameters
| $filename |
unique file name as ID
|
| $ttl |
time in seconds, -1 mean never expired
|
Returns
|
#
|
public
|
registerGate(
string $gate,
string $gate_dir_path,
string $s_namespace = "",
string $permtitle = "",
array $permlist = null,
)
Register file with App Gate Name
Register file with App Gate Name
Parameters
| $gate |
Name of Gate assigned to Gate
|
| $gate_dir_path |
Attach Gate path.
Path end with .php is module Gate
and path end with .Gate is class Gate.
Filename should match with class name
|
| $s_namespace |
if class Gate is under a name space
|
| $permtitle |
Title Display in Permission List
|
| $permlist |
Create Permissions List for Gate
|
|
#
|
public
|
isRegisterGate(string $gate): boolean
Check Gate is registered
|
#
|
public
|
getGatePath(string $gate): array
Get Gate Path that is registered with Gate name $gate
Get Gate Path that is registered with Gate name $gate
|
#
|
public
|
getRegisteredGates(): array
Get List of Registered Gates
Get List of Registered Gates
|
#
|
public
|
getRegisteredGate(string $gate_file_path): string|null
Get Gate name that has matched file path with $gate_file_path
Get Gate name that has matched file path with $gate_file_path
|
#
|
public
|
getRootPath(string $val): string
Get Root folder path of a path.
It may be inside res folder or project folder.
Return SphpBase::sphp_settings()->php…
Get Root folder path of a path.
It may be inside res folder or project folder.
Return SphpBase::sphp_settings()->php_path or PROJ_PATH
Parameters
|
#
|
public
|
respathToFilepath(string $fileurl): array
Convert URL to local server filepath
$a = SphpBase::sphp_api->respathToFilepath("../res/jslib/twitter/bootstarp4/main…
Convert URL to local server filepath
$a = SphpBase::sphp_api->respathToFilepath("../res/jslib/twitter/bootstarp4/main.css")
Returns
pathinfo,directory,url path,filepath
|
#
|
public
|
filepathToRespaths(string $filepath): array
Convert filepath to URL path for browser
$a = SphpBase::sphp_api->filepathToRespaths("Gates/chat/index.Gate")
Convert filepath to URL path for browser
$a = SphpBase::sphp_api->filepathToRespaths("Gates/chat/index.Gate")
Returns
pathinfo,directory,url path,filepath
|
#
|
public
|
getMyResPath($filepath)
|
#
|
public
|
runGate(string $path)
Run Class type Gate
|
#
|
public
|
getGateObject(string $path): formname
Create Gate object from $path as filepath
Create Gate object from $path as filepath
|
#
|
public
|
getRegisterGateClass(string $filepath, boolean $setEnv = true): type
Parameters
| $filepath |
Gate Path
|
| $setEnv |
Default true = set Gate_gate_dir_path variable
|
|
#
|
public
|
getGlobal(string $varname): mixed
Read Global Variable
|
#
|
public
|
setGlobal(string $varname, mixed $val)
Write Global Variable
|
#
|
public
|
raiseError(string $msg)
Set Error Status Flag.
|
#
|
public
|
println(string $str)
Print Message with end Line(br) in HTML
Print Message with end Line(br) in HTML
|
#
|
public
|
boolToInt(boolean $boolean1): int
Convert Bool to Int
|
#
|
public
|
boolToYesNo(boolean $boolean1): string
Convert Bool to Yes,No
|
#
|
public
|
boolToString(boolean $boolean1): string
Convert Bool to String True,False
Convert Bool to String True,False
|
#
|
public
|
stringToBool(string $str): boolean
Convert True,False to Bool
Convert True,False to Bool
|
#
|
public
|
in_arrayi(string $needle, array $haystack): boolean
Search exact match of Needle in array values as case insensitive
Search exact match of Needle in array values as case insensitive
|
#
|
public
|
array_search_str(string $haystack, array $needle): boolean
Search Needle as array match anywhere in haystack as case insensitive
Search Needle as array match anywhere in haystack as case insensitive
|
#
|
public
|
find_line_number(string $haystack, string $needle): int
Search Needle match anywhere in haystack and return line number
Search Needle match anywhere in haystack and return line number
Returns
|
#
|
public
|
array_change_val_case(array $arr, string $case1 = ""): array
Change Case of Values in array
Change Case of Values in array
Parameters
| $case1 |
Default strtolower other value = strtoupper
|
|
#
|
public
|
array_search_i(type $needle, type $haystack): int|string|false
Search first match of Needle in array as case insensitive
Search first match of Needle in array as case insensitive
Returns
|
#
|
public
|
getIP(): String<br>
Return IP Value of Client
Return IP Value of Client
|
#
|
public
|
getGuestDetails(): array<br>
Return Client Details IP, Request method, url,protocol,referer,browser
ret = SphpBase::sphp_api()->getGuestDetails();…
Return Client Details IP, Request method, url,protocol,referer,browser
ret = SphpBase::sphp_api()->getGuestDetails();
echo ret["ip"];
echo ret["method"] ;
echo ret["uri"] ;
echo ret["protocol"];
echo ret["referer"] ;
echo ret["agent"] ;
|
#
|
public
|
getIPDetail(): array<br>
Return Client location: city country
echo ipDetail["city"];<br>
echo ipDetail["country"];<br>
echo ipDetail["country…
Return Client location: city country
echo ipDetail["city"];
echo ipDetail["country"];
echo ipDetail["country_code"];
this function use http://hostip.info/ website api for conversion
|
#
|
public
|
is_valid_num(string $val, string $datatype = "FLOAT"): boolean
Check if string is a number
Check if string is a number
Parameters
| $datatype |
default FLOAT other value is INT
|
|
#
|
public
|
getEngine()
|
#
|
public
|
is_valid_email(string $email): boolean
Check valid email format
|
#
|
public
|
getJSArray(string $jsVarName, array $phpArray, $novar = false): string
Generate JS Array code for PHP Array
Generate JS Array code for PHP Array
Parameters
| $jsVarName |
JS Array variable name in code
|
|
#
|
public
|
getJSArrayAss(string $jsVarName, array $phpArray, $novar = false): string
Generate JS Associative Array code for PHP Array
Generate JS Associative Array code for PHP Array
Parameters
| $jsVarName |
JS Associative Array variable name in code
|
|
#
|
public
|
HTMLToJS(string $strHTML): string
Convert HTML string into JS string
Convert HTML string into JS string
|
#
|
public
|
getSartajPHP(): String
Get SartajPHP Version
|
#
|
public
|
getSartajPHPVer()
|
#
|
public
|
setServLanguage($val)
|
#
|
public
|
getServLanguage()
|
#
|
public
|
isDebugMode()
|
#
|
public
|
getDynamicContent(string $filepath, object $caller = null, bool $stringpass = false): string
Get string from php content
Get string from php content
Parameters
| $filepath |
filepath or string
|
| $caller |
variable pass as object or array to use inside content as $caller->myprop
|
| $stringpass |
$filepath as string
|
|
#
|
public
|
minifyPHP(string $filedata): string
Minify PHP code string
|
#
|
public
|
minifyCSS(string $filedata): string
Minify CSS code string
|
#
|
public
|
minifyHTML(string $filedata): string
Minify HTML code string
|
#
|
public
|
minifyJS(string $filedata): string
Minify JS code string
|
#
|
public
|
safeWriteFile(string $filepath, string|mixed $data): int|Exception
Safe write file
Parameters
| $filepath |
file path
|
| $data |
content to write in file
|
|
#
|
public
|
triggerError(type $msg, type $errType, array $debug_array)
Trigger Error
SphpBase::sphp_api()->triggerError("Couldn't get any result from database", E_USER_NOTICE,debug_backtrace…
Trigger Error
SphpBase::sphp_api()->triggerError("Couldn't get any result from database", E_USER_NOTICE,debug_backtrace())
Parameters
| $msg |
Error Message
|
| $errType |
Default E_USER_NOTICE
|
|
#
|
public
|
getrenderType(boolean $renderonce = false): string
Advance Function, Internal use
Advance Function, Internal use
Parameters
| $renderonce |
Default false
|
|
#
|
public
|
addFileLink(
string $fileURL,
boolean $renderonce = false,
string $filename = "",
string $ext = "",
string $ver = "0",
array $assets = [],
int $async = 0,
)
Add CSS, JS File Link for browser
SphpBase::sphp_api()->addFileLink("front/default/theme-black.css",true,"","","2.7")…
Add CSS, JS File Link for browser
SphpBase::sphp_api()->addFileLink("front/default/theme-black.css",true,"","","2.7")
SphpBase::sphp_api()->addFileLink("front/default/theme-black.js",false,"black1","js","2.7")
Parameters
| $fileURL |
URL for file
|
| $renderonce |
Optional default false if true then file ignore in AJAX request
|
| $filename |
Optional file identification key. default=filename in fileurl
|
| $ext |
Optional default=file extension in fileurl
|
| $ver |
Optional default=0 file version if any
|
| $assets |
path for asset folders to copy with this file when distribute
|
| $async |
Default=global file setting, 2=defer, 1= async and 0=default
|
|
#
|
public
|
updateFileLink(
string $fileURL,
boolean $renderonce = false,
string $filename = "",
string $ext = "",
string $ver = "0",
array $assets = [],
int $async = 0,
)
Update CSS, JS File Link for browser
SphpBase::sphp_api()->updateFileLink("front/default/theme-black2.js",false,…
Update CSS, JS File Link for browser
SphpBase::sphp_api()->updateFileLink("front/default/theme-black2.js",false,"black1","js","2.8")
Parameters
| $fileURL |
URL for file
|
| $renderonce |
Optional default false if true then file ignore in AJAX request
|
| $filename |
Optional file identification key. default=filename in fileurl
|
| $ext |
Optional default=file extension in fileurl
|
| $ver |
Optional default=0 file version if any
|
| $assets |
path for asset folders to copy with this file when distribute
|
| $async |
Default=global file setting, 2=defer, 1= async and 0=default
|
|
#
|
public
|
removeFileLink(string $fileURL, boolean $renderonce = false, string $filename = "", string $ext = "")
Remove CSS, JS File Link for browser
SphpBase::sphp_api()->removeFileLink("front/default/theme-black2.js",false,…
Remove CSS, JS File Link for browser
SphpBase::sphp_api()->removeFileLink("front/default/theme-black2.js",false,"black1","js")
Parameters
| $fileURL |
URL for file
|
| $renderonce |
Optional default false if true then file ignore in AJAX request
|
| $filename |
Optional file identification key. default=filename in fileurl
|
| $ext |
Optional default=file extension in fileurl
|
|
#
|
public
|
addFileLinkCode(string $name, string $code, boolean $renderonce = false)
Insert HTML Tag into header section.
SphpBase::sphp_api()->addFileLinkCode("f1",'<meta name="viewport" content="width…
Insert HTML Tag into header section.
SphpBase::sphp_api()->addFileLinkCode("f1",'')
Parameters
| $name |
Name as id
|
| $code |
HTML link tag code
|
| $renderonce |
Optional default false, true mean ignore in AJAX request
|
|
#
|
public
|
issetFileLink(string $filename, string $ext, boolean $renderonce = false): boolean
Check if filelink is set
if(SphpBase::sphp_api()->issetFileLink("black1","js",false)){
// add more related files
}
Check if filelink is set
if(SphpBase::sphp_api()->issetFileLink("black1","js",false)){
// add more related files
}
Parameters
| $renderonce |
Optional default false, true mean ignore in AJAX request
|
|
#
|
public
|
getParentDirectory($path)
|
#
|
public
|
directoriesCreate($dirPath, $mod = 0775, $owner = "")
|
#
|
public
|
directoryCopy($src, $dst, $fixdst = "")
|
#
|
public
|
getDistGlobalJSFiles(
boolean $min = false,
boolean $removeonly = false,
boolean $combine = true,
string $distpath = "cache",
): string
Advance Function
Distribute All Global JS Lib (render once=true) JS files. These
Files will not load by AJAX.
Advance Function
Distribute All Global JS Lib (render once=true) JS files. These
Files will not load by AJAX.
Parameters
| $min |
Optional no use
|
| $removeonly |
Optional if true then remove only links
|
| $combine |
Optional if true then combine files
|
| $distpath |
Optional Folder Path to copy files Default = cache
|
|
#
|
public
|
getDistJSFiles(
boolean $min = false,
boolean $removeonly = false,
boolean $combine = true,
string $distpath = "cache",
): string
Advance Function
Distribute All private files (render once=false) JS files. These
Files can also load via AJAX
Advance Function
Distribute All private files (render once=false) JS files. These
Files can also load via AJAX
Parameters
| $min |
Optional no use
|
| $removeonly |
Optional if true then remove only links
|
| $combine |
Optional if true then combine files
|
| $distpath |
Optional Folder Path to copy files Default = cache
|
|
#
|
public
|
getDistCSSFiles(
boolean $min = false,
boolean $removeonly = false,
boolean $combine = true,
string $distpath = "cache",
): string
Advance Function
Distribute All css files
Advance Function
Distribute All css files
Parameters
| $min |
Optional no use
|
| $removeonly |
Optional if true then remove only links no output
|
| $combine |
Optional if true then combine files
|
| $distpath |
Optional Folder Path to copy files Default = cache
|
|
#
|
public
|
getCombineFileLinks(string $parentfolder = "front", boolean $addcss = false, boolean $force_overwrite = false)
Combine All js and css filelinks and create combine file in $parentfolder folder.
It also incudes addFileLink code for…
Combine All js and css filelinks and create combine file in $parentfolder folder.
It also incudes addFileLink code for browser.
Combines multiple css files into one may brake relative path. So you also
need to copy assets manually into relative path. If
you want to leave css links to combine but combine few css files then use combineFiles function to
combine required css files.
in Debug mode=2 it create fresh file on every request but in normal mode
it checks file exist and create if not exist.
Parameters
| $parentfolder |
Optional Default=front parent folder to save combo files
|
| $addcss |
Optional Default=false create css css combo file
|
| $force_overwrite |
Optional Default=false create fresh combo files
|
|
#
|
public
|
combineFiles(array $array_list, string $outputfilepath = "front/combo2.css", boolean $force_overwrite = false)
Combine All files path into single file as $outputfilepath
It willn't incudes addFileLink code for browser. You need to…
Combine All files path into single file as $outputfilepath
It willn't incudes addFileLink code for browser. You need to provide browser
code if you need to send link to browser.
Combines multiple css files into one may brake relative path. So you also
need to copy assets manually into relative path. If
in Debug mode=2 it create fresh file on every request but in normal mode
it checks file exist and create if not exist.
Parameters
| $array_list |
List of files path
|
| $outputfilepath |
Optional Default=front/combo2.css Combine file path
|
| $force_overwrite |
Optional Default=false create fresh combo files
|
|
#
|
public
|
isHeaderJSFunctionExist(string $funname, string $rendertype = "private"): boolean
Check JS Function Exist in Header Section
Check JS Function Exist in Header Section
Parameters
| $funname |
Function name as id
|
| $rendertype |
default=private other value is global
|
|
#
|
public
|
isFooterJSFunctionExist(string $funname, string $rendertype = "private"): boolean
Check JS Function Exist in Footer Section
Check JS Function Exist in Footer Section
Parameters
| $funname |
Function name as id
|
| $rendertype |
default=private other value is global
|
|
#
|
public
|
addHeaderJSFunction(string $funname, string $startcode, string $endcode, boolean $renderonce = false)
Add JS Function header section.
SphpBase::sphp_api()->addHeaderJSFunction("myfun","function myfun(){var v1 = 12;","}")…
Add JS Function header section.
SphpBase::sphp_api()->addHeaderJSFunction("myfun","function myfun(){var v1 = 12;","}");
SphpBase::sphp_api()->addHeaderJSFunctionCode("myfun","code1","console.log(v1);");
Parameters
| $funname |
Function name as id
|
| $renderonce |
Optional default false, true mean ignore in AJAX request
|
|
#
|
public
|
addFooterJSFunction(string $funname, string $startcode, string $endcode, boolean $renderonce = false)
Add JS Function footer section.
SphpBase::sphp_api()->addFooterJSFunction("myfun","function myfun(){var v1 = 12;","}")…
Add JS Function footer section.
SphpBase::sphp_api()->addFooterJSFunction("myfun","function myfun(){var v1 = 12;","}");
SphpBase::sphp_api()->addFooterJSFunctionCode("myfun","code1","console.log(v1);");
Parameters
| $funname |
Function name as id
|
| $renderonce |
Optional default false, true mean ignore in AJAX request
|
|
#
|
public
|
addHeaderJSFunctionCode(string $funname, type $name, type $code, boolean $renderonce = false)
Insert JS Code into JS Function in header section.
SphpBase::sphp_api()->addHeaderJSFunctionCode("myfun","code1",…
Insert JS Code into JS Function in header section.
SphpBase::sphp_api()->addHeaderJSFunctionCode("myfun","code1","console.log(v1);");
Parameters
| $funname |
Function name as id
|
| $name |
Code block name as id
|
| $code |
JS code
|
| $renderonce |
Optional default false, true mean ignore in AJAX request
|
|
#
|
public
|
addFooterJSFunctionCode(string $funname, type $name, type $code, boolean $renderonce = false)
Insert JS Code into JS Function in header section.
SphpBase::sphp_api()->addFooterJSFunctionCode("myfun","code1",…
Insert JS Code into JS Function in header section.
SphpBase::sphp_api()->addFooterJSFunctionCode("myfun","code1","console.log(v1);");
Parameters
| $funname |
Function name as id
|
| $name |
Code block name as id
|
| $code |
JS code
|
| $renderonce |
Optional default false, true mean ignore in AJAX request
|
|
#
|
public
|
addHeaderJSCode(type $name, type $code, boolean $renderonce = false)
Insert JS Code into header section
SphpBase::sphp_api()->addHeaderJSCode("code1","console.log('test js code');");
Insert JS Code into header section
SphpBase::sphp_api()->addHeaderJSCode("code1","console.log('test js code');");
Parameters
| $name |
Code block name as id
|
| $code |
JS code
|
| $renderonce |
Optional default false, true mean ignore in AJAX request
|
|
#
|
public
|
addHeaderCSS(type $name, type $code, boolean $renderonce = false)
Insert CSS Code into header section
SphpBase::sphp_api()->addHeaderCSS("code1","p{color: #FF88F6;}");
Insert CSS Code into header section
SphpBase::sphp_api()->addHeaderCSS("code1","p{color: #FF88F6;}");
Parameters
| $name |
Code block name as id
|
| $code |
JS code
|
| $renderonce |
Optional default false, true mean ignore in AJAX request
|
|
#
|
public
|
addFooterJSCode(type $name, type $code, boolean $renderonce = false)
Insert JS Code into footer section
SphpBase::sphp_api()->addFooterJSCode("code1","console.log('test js code');");
Insert JS Code into footer section
SphpBase::sphp_api()->addFooterJSCode("code1","console.log('test js code');");
Parameters
| $name |
Code block name as id
|
| $code |
JS code
|
| $renderonce |
Optional default false, true mean ignore in AJAX request
|
|
#
|
public
|
getHeaderJS(boolean $htmltag = true, boolean $global = true, int $blockJSCode = 0): string
Advance Function, Internal use
Generate all JS code for Header section
Advance Function, Internal use
Generate all JS code for Header section
Parameters
| $htmltag |
Optional default true generate HTML tags
|
| $global |
Optional default true generate render once code also
|
| $blockJSCode |
Optional default 0 block JS code section Other values 1 and 2
|
|
#
|
public
|
getFilterJSString(string $str): string
Filter String as JS String
Filter String as JS String
|
#
|
public
|
getFooterJS(boolean $htmltag = true, boolean $global = true, int $blockJSCode = 0): string
Advance Function, Internal use
Generate all JS code for Footer section
Advance Function, Internal use
Generate all JS code for Footer section
Parameters
| $htmltag |
Optional default true generate HTML tags
|
| $global |
Optional default true generate render once code also
|
| $blockJSCode |
Optional default 0 block JS code section Other values 1 and 2
|
|
#
|
public
|
getHeaderHTML(boolean $htmltag = true, boolean $global = true, int $blockJSCode = 0): string
Advance Function, Internal use
Generate all HTML,CSS and JS code for Header Section
Advance Function, Internal use
Generate all HTML,CSS and JS code for Header Section
Parameters
| $htmltag |
Optional default true generate HTML tags
|
| $global |
Optional default true generate render once code also
|
| $blockJSCode |
Optional default 0 block JS code section Other values 1 and 2
|
|
#
|
public
|
getFooterHTML(boolean $htmltag = true, boolean $global = true, int $blockJSCode = 0): string
Advance Function, Internal use
Generate all HTML,CSS and JS code for Footer Section
Advance Function, Internal use
Generate all HTML,CSS and JS code for Footer Section
Parameters
| $htmltag |
Optional default true generate HTML tags
|
| $global |
Optional default true generate render once code also
|
| $blockJSCode |
Optional default 0 block JS code section Other values 1 and 2
|
|
#
|
public
|
consoleMsg(string $msg, string $type = "log"): string
Generate JS Code for console message.
Generate JS Code for console message.
Parameters
| $type |
Optional Default=log, it is same as JS console like info, error
|
|
#
|
public
|
traceError(type $blnDontJS = false): string
Print Error message in browser in HTML or JS code. This
uses SphpBase::sphp_api()->setErr function for set error…
Print Error message in browser in HTML or JS code. This
uses SphpBase::sphp_api()->setErr function for set error message.
SphpBase::sphp_api()->getCheckErr() for check if there are any error.
Parameters
| $blnDontJS |
Optional Default false
|
|
#
|
public
|
setErr(string $name, string $msg)
Set Error Message and Error Flag, display for User of your project.
This isn't PHP Language errors. It doesn't break…
Set Error Message and Error Flag, display for User of your project.
This isn't PHP Language errors. It doesn't break your
program execution. It is flag base error status which then you can
use for decision making on server side or browser side. You can also set this flag
from PHP exception and display error message in html tag rather then broken PHP
output. Like validation error on TextBox Component will also set error flag on server and
send back html error message with proper format and valid HTML.
After this SphpBase::sphp_api()->getCheckErr() return true.
Parameters
| $name |
id for message error
|
|
#
|
public
|
getCheckErr(): boolean
SphpBase::sphp_api()->getCheckErr() for check if there are any error set by setErr.
SphpBase::sphp_api()->getCheckErr() for check if there are any error set by setErr.
|
#
|
public
|
unsetCheckErr()
Clear error flag set by setErr.
Clear error flag set by setErr.
|
#
|
public
|
getErrMsg(string $name): array
Parameters
| $name |
name as id of error
|
|
#
|
public
|
traceMsg(type $blnDontJS = false): string
Print Error message in browser in HTML or JS code. This
uses SphpBase::sphp_api()->setMsg function for set message.
Print Error message in browser in HTML or JS code. This
uses SphpBase::sphp_api()->setMsg function for set message.
Parameters
| $blnDontJS |
Optional Default false
|
|
#
|
public
|
setMsg(string $name, string $msg)
Set Message for browser, display for User.
Set Message for browser, display for User.
Parameters
|
#
|
public
|
getMsg(string $name): array
Parameters
| $name |
name as id of message
|
Returns
list of Messages under Name
|
#
|
public
|
traceErrorInner(type $blnDontJS = false): string
Print Developer Error message in browser in HTML or JS code.
These errors are only available in debug mode and gives…
Print Developer Error message in browser in HTML or JS code.
These errors are only available in debug mode and gives some extra informations
to devloper about logical erros or help in debugging.
Not php erros or exceptions whichbreak executions.
These are just messages which can also comes from PHP errors.
uses SphpBase::sphp_api()->setErrInner function for set error developer message.
Parameters
| $blnDontJS |
Optional Default false
|
|
#
|
public
|
setErrInner(string $name, string $msg)
Set Error Inner for developer
Set Error Inner for developer
Parameters
|
#
|
public
|
getErrMsgInner(string $name): array
Read Inner Error Message
|
#
|
public
|
setFrontPlacePath(string $frontname, string $filepath, string $secname = "left")
Set Front Place ignore if addFrontPlace don't initialize front place.
It only reserve place. But not render in master…
Set Front Place ignore if addFrontPlace don't initialize front place.
It only reserve place. But not render in master without addFrontPlace.
Parameters
| $frontname |
name is id
|
| $filepath |
file path full FrontFile or Php file
|
| $secname |
Optional Default=left
|
|
#
|
public
|
removeFrontPlace(string $frontname, string $secname = "left")
Remove Front Place.
Parameters
| $frontname |
name is id
|
| $secname |
Optional Default=left
|
|
#
|
public
|
addFrontPlace(string $frontname, string $filepath = "", string $secname = "left")
Add and initialize front place.
Add and initialize front place.
Parameters
| $frontname |
name is id
|
| $filepath |
File path of FrontFile or Php file, leave if you want to use from setFrontPlacePath
|
| $secname |
Optional Default=left
|
|
#
|
public
|
getFrontPlace(string $frontname, string $secname = "left"): FrontFile|string
Get Front Place Object or path
Get Front Place Object or path
Parameters
| $frontname |
name is id
|
| $secname |
Optional Default=left
|
|
#
|
public
|
runFrontPlace(string $frontname, string $secname = "left")
Run Front Place. Only Run FrontFile not PHP.
PHP file include only on render time.
Run Front Place. Only Run FrontFile not PHP.
PHP file include only on render time.
Parameters
| $frontname |
name is id
|
| $secname |
Optional Default=left
|
|
#
|
public
|
renderFrontPlaceManually(string $frontname, string $secname = "left"): string
Render Front Place Manually. It doesn't support PHP files.
$frontname=dynData is reserved of center content of master.…
Render Front Place Manually. It doesn't support PHP files.
$frontname=dynData is reserved of center content of master.
It will return dynData.
Parameters
| $frontname |
name is id
|
| $secname |
Optional Default=left
|
Returns
HTML output from FrontFile
|
#
|
public
|
renderFrontPlace(string $frontname, string $secname = "left")
Render Front Place. $frontname=dynData is reserved of center content of master.
It will render dynData.
Render Front Place. $frontname=dynData is reserved of center content of master.
It will render dynData.
Parameters
| $frontname |
name is id
|
| $secname |
Optional Default=left
|
|
#
|
public
|
runFrontSection(string $secname = "left")
Run All Front Places in a section
Run All Front Places in a section
Parameters
| $secname |
Optional Default=left
|
|
#
|
public
|
addrunFrontSection(string $secname = "left")
Add and Run All Front Places in a section.
If any Front Place is not added but set then this will add automatically.
Add and Run All Front Places in a section.
If any Front Place is not added but set then this will add automatically.
Parameters
| $secname |
Optional Default=left
|
|
#
|
public
|
listNotRenderFrontSection(string $secname = "left")
List of all front places which isn't render
List of all front places which isn't render
Parameters
| $secname |
Optional Default=left
|
|
#
|
public
|
renderFrontSection(string $secname = "left")
Render All Front Places in a section.
Render All Front Places in a section.
Parameters
| $secname |
Optional Default=left
|
|
#
|
public
|
endec(string $str, string $ky = "CD098ABA"): string
Encrypt/Decrypt String. Use Hexadecimal key. Output Length is not big.
Data recover is near to impossible if you lost…
Encrypt/Decrypt String. Use Hexadecimal key. Output Length is not big.
Data recover is near to impossible if you lost key.
Parameters
| $ky |
Optional secure key in hexadecimal
|
|
#
|
public
|
rtClassMethod(ReflectionClass &$refClass)
|
#
|
public
|
rtClassFile(ReflectionClass &$refClass)
|
#
|
public
|
rtMethodSource(ReflectionMethod &$method, &$arlines)
|
#
|
public
|
rtMethodParamFromString($strline, $parameters)
|
#
|
public
|
rtMethodParm(&$method)
|
#
|
public
|
rtClassConstantHelp($mainClass, ReflectionClass &$reflector)
|
#
|
public
|
rtScopeDefinedHelp(&$arCls, &$arConst, &$arFun, &$arVars)
|
#
|
public
|
rtClassMethodInvoke(&$method, &$obj, $args = null)
|
#
|
public
|
rtFunctionInvoke($fun, $args = null)
|
#
|
public
|
rtClassMethodFromFileLine(ReflectionClass &$reflector, $line)
|
#
|
public
|
rtClassMethodHelp($mainClass, ReflectionClass &$reflector, &$arResult)
|
#
|
public
|
rtClassPropertyHelp($mainClass, $clsobj, ReflectionClass &$reflector, &$arResult)
|
#
|
public
|
rtAutoCompleteFormat($objname, $helpdoc, $objtype, $code, $helptype)
|
#
|
public
|
executePHP($strPHPCode)
|
#
|
public
|
executePHPGlobal($strPHPCode)
|
#
|
public
|
executePHPFunc($strPHPCode)
|
#
|
public
|
consoleWrite($param)
|
#
|
public
|
consoleWriteln($param)
|
#
|
public
|
consoleReadln($msg)
|
#
|
public
|
consoleError($err)
|
#
|