Methods |
public
|
init()
Advance function, Internal use
Advance function, Internal use
|
#
|
public
|
registerTempFile(string $key, TempFile $obj)
Register TempFile
Parameters
$key |
name of tempfile
|
$obj |
TempFile 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
|
addComponent(string $comp, Control $obj)
Advance Function, Internal use
Add Component
Advance Function, Internal use
Add Component
Parameters
$comp |
Name for identification
|
$obj |
Control Object
|
|
#
|
public
|
addComponentDB(string $tempname, string $comp, Control $obj)
Advance Function, Internal use
Add Component for Database bound
Advance Function, Internal use
Add Component for Database bound
Parameters
$tempname |
tempfile name for identification as key
|
$comp |
Name for identification as key
|
$obj |
Control Object
|
|
#
|
public
|
getComponentsDB(): Control
Advance Function, Internal use
Get Components List for Database bound
Advance Function, Internal use
Get Components List for Database bound
|
#
|
public
|
isComponent(string $comp): Control|null
Get Component if exist in List
Get Component if exist in List
Parameters
$comp |
Component 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 separtaed 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
|
addCacheList(string $url, int $sec = 0, string $type = "controller")
Cache a request URL if it doesn't need processing.
SphpBase::sphp_api()->addCacheList("index",100)
Cache index…
Cache a request URL if it doesn't need processing.
SphpBase::sphp_api()->addCacheList("index",100)
Cache index application with all events and refersh interval is 100 seconds. Cache will update the index app with
interval of 100 seconds.
Parameters
$url |
match for cache like cache "index" or "index-page"
|
$sec |
Expiry Time in seconds -1 mean never expire
|
$type |
type = Default controller mean url has controller name only and response to all events basis on this controller
type = ce mean controller-event cache only that event
type = cep mean controller-event-evtp cache only that event with that parameter
type = e event on any application will be use cache
|
|
#
|
public
|
isRegisterCacheItem(string $url): boolean
Check if URL register with cache list
Check if URL register with cache list
|
#
|
public
|
getCacheItem(string $url): array
Read Cache Item from Cache List
Read Cache Item from Cache List
|
#
|
public
|
registerApp(string $ctrl, string $apppath, string $s_namespace = "", string $permtitle = "", array $permlist = null)
Register Application with an controller
Register Application with an controller
Parameters
$ctrl |
Name of controller assigned to application
|
$apppath |
Attach application path.
Path end with .php is module application
and path end with .app is class application.
Filename should match with class name
|
$s_namespace |
if class application is under a name space
|
$permtitle |
Title Display in Permission List
|
$permlist |
Create Permissions List for application
|
|
#
|
public
|
isRegisterApp(string $ctrl): boolean
Check application is registered
Check application is registered
|
#
|
public
|
getAppPath(string $ctrl): array
Get Application Details that is registered with controller name $ctrl
Get Application Details that is registered with controller name $ctrl
|
#
|
public
|
getRegisteredApps(): array
Get List of Registered Applications
Get List of Registered Applications
|
#
|
public
|
getAppCtrl(string $appfilepath): string|null
Get Controller name that has matched apppath with $appfilepath
Get Controller name that has matched apppath with $appfilepath
|
#
|
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("apps/chat/index.app")
Convert filepath to URL path for browser
$a = SphpBase::sphp_api->filepathToRespaths("apps/chat/index.app")
Returns
pathinfo,directory,url path,filepath
|
#
|
public
|
runApp(string $path)
Run Class type Application
Run Class type Application
|
#
|
public
|
getAppObject(string $path): formname
Create Application object from $path as filepath
Create Application object from $path as filepath
|
#
|
public
|
getRegisterAppClass(string $filepath, boolean $setEnv = true): type
Parameters
$filepath |
App Path
|
$setEnv |
Default true = set apppath 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(type $filepath, $caller = null): string
Get string from php content
Get string from php content
|
#
|
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("temp/default/theme-black.css",true,"","","2.7")…
Add CSS, JS File Link for browser
SphpBase::sphp_api()->addFileLink("temp/default/theme-black.css",true,"","","2.7")
SphpBase::sphp_api()->addFileLink("temp/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("temp/default/theme-black2.js",false,"black1…
Update CSS, JS File Link for browser
SphpBase::sphp_api()->updateFileLink("temp/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("temp/default/theme-black2.js",false,"black1…
Remove CSS, JS File Link for browser
SphpBase::sphp_api()->removeFileLink("temp/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 = "temp", 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=temp 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 = "temp/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=temp/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): string
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): string
Parameters
$name |
name as id of message
|
|
#
|
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): string
Read Inner Error Message
|
#
|
public
|
setFrontPlacePath(string $frontname, string $basepath, string $secname = "left", string $type = "TempFile")
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
|
$basepath |
DIR path
|
$secname |
Optional Default=left
|
$type |
Optional Default=TempFile
|
|
#
|
public
|
removeFrontPlace(string $frontname, string $secname = "left")
Remove Front Place.
Parameters
$frontname |
name is id
|
$secname |
Optional Default=left
|
|
#
|
public
|
addFrontPlace(string $frontname, $filepath = "", string $secname = "left", string $type = "TempFile")
Add and initialize front place.
Add and initialize front place.
Parameters
$frontname |
name is id
|
$secname |
Optional Default=left
|
$type |
Optional Default=TempFile It recogonise extensions front or php
|
|
#
|
public
|
getFrontPlace(string $frontname, string $secname = "left"): TempFile|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 TempFile not PHP.
PHP file include only on render time.
Run Front Place. Only Run TempFile not PHP.
PHP file include only on render time.
Parameters
$frontname |
name is id
|
$secname |
Optional Default=left
|
|
#
|
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
|
encrypt(string $strdata, string $key = "sartajphp211"): string
Encrypt String
Parameters
$key |
Optional Default=sbrtyu837
|
|
#
|
public
|
decrypt(string $strdata, string $key = "sartajphp211"): string
Decrypt String
Parameters
$key |
Optional Default=sbrtyu837
|
|
#
|
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 Default=CD098AB
|
|
#
|
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)
|
#
|