Methods |
public
|
setFilePath(string $filePath)
Advance Function
Set File Path of TempFile
Advance Function
Set File Path of TempFile
|
#
|
public
|
setWebapp(WebApp $webapp)
Advance Function
Bind with back-end type Application or front-end type application.
Remember BasicApp is front-end…
Advance Function
Bind with back-end type Application or front-end type application.
Remember BasicApp is front-end application type which
can manage more then one temp file or run without any temp file like in case of API.
Back-end application like WebApp always requires TempFile
for run. Like PSP Application is a back-end application type.
|
#
|
public
|
setWebapppath(string $webapppath)
Advance Function
Set bound application file path
Advance Function
Set bound application file path
|
#
|
public
|
setBlncodebehind(boolean $blncodebehind)
Advance Function
Set TempFile can bind with back-end application type
Advance Function
Set TempFile can bind with back-end application type
Parameters
$blncodebehind |
True mean, bound with back-end application
|
|
#
|
public
|
setBlncodefront($blncodefront)
Advance Function
Set TempFile can bind with front-end application type
Advance Function
Set TempFile can bind with front-end application type
|
#
|
public
|
setAppname(string $appname)
Advance Function
Set Parent App Name
Advance Function
Set Parent App Name
|
#
|
public
|
setComponent(string $key, Control $obj)
Advance Function
Add component object in TempFile
Advance Function
Add component object in TempFile
Parameters
$key |
component name or id in HTML code
|
|
#
|
public
|
addAsJSVar()
Add TempFile as JS Variable to store the JS Objects of components.
name of tempfile is used as variable name in JS
Add TempFile as JS Variable to store the JS Objects of components.
name of tempfile is used as variable name in JS
|
#
|
public
|
registerTempFile()
Advance Function
Register TempFile with SphpApi
Advance Function
Register TempFile with SphpApi
|
#
|
public
|
getFile(
string $TempFilePath,
boolean $blnStringData = false,
BasicApp $backfileobj = null,
string $use_sjs_file = false,
BasicApp $parentappobj = null,
)
Advance Function
Parameters
$TempFilePath |
File path of TempFile Or Direct code as string
|
$blnStringData |
Optional Default=false, If true then $TempFilePath= string code
|
$backfileobj |
Optional Default=null, bind application with TempFile
|
$use_sjs_file |
Optional Default=false true mean use sjs file bind with temp file
|
$parentappobj |
Optional Default=null, Parent App of TempFile
|
|
#
|
public
|
onAppEvent()
Advance Function
App Event handler trigger by application.
Advance Function
App Event handler trigger by application.
|
#
|
public
|
run()
Advance Function
Process TempFile
also run and render back-end application if any
Advance Function
Process TempFile
also run and render back-end application if any
|
#
|
public
|
render()
Advance Function
echo TempFile data
Advance Function
echo TempFile data
|
#
|
public
|
runit()
Advance Function
Process TempFile
Advance Function
Process TempFile
|
#
|
public
|
renderit()
Advance Function
echo TempFile data
Advance Function
echo TempFile data
|
#
|
public
|
getData(): string
Get Generated HTML data. Data available after run. This function help-full if you are not using render
Get Generated HTML data. Data available after run. This function help-full if you are not using render
|
#
|
public
|
getFilePath(): string
File Path of TempFile
|
#
|
public
|
getName(): string
Get Name(id) of temp file
Get Name(id) of temp file
|
#
|
public
|
getBindApp(): BasicApp
Get Parent App or Bind App with temp file. It return bound app if TempFile bound with app
Get Parent App or Bind App with temp file. It return bound app if TempFile bound with app
|
#
|
public
|
getWebapp(): WebApp
Get Application that is bound with temp file
Get Application that is bound with temp file
|
#
|
public
|
getWebapppath(): string
Get App Path which is bound with this temp file
Get App Path which is bound with this temp file
|
#
|
public
|
getSjspath(): string
Get SJS File Path which is bound with this temp file
Get SJS File Path which is bound with this temp file
|
#
|
public
|
getAppname(): string
Get Parent App Name
|
#
|
public
|
disablePHP($level = 0)
Disable PHP execution set $intPHPLevel=0, Default it is on 3.
Enable php execution in temp file. 0= no php execution, …
Disable PHP execution set $intPHPLevel=0, Default it is on 3.
Enable php execution in temp file. 0= no php execution,
1 = only controls attribute,
2 = php in all tags, 3 = all tags + pass global variables
|
#
|
public
|
setSjspath($sjspath)
Set SJS file path
|
#
|
public
|
setBlnshowFront(boolean $blnshowFront)
Enable rendering for temp file
Enable rendering for temp file
|
#
|
public
|
getBlnshowFront(): boolean
Check if TempFile can render
Check if TempFile can render
|
#
|
public
|
getBlncodefront(): boolean
Check if TempFile is bound with any front-end application type
Check if TempFile is bound with any front-end application type
|
#
|
public
|
getBlncodebehind(): boolean
Check if TempFile is bound with any back-end application type
Check if TempFile is bound with any back-end application type
|
#
|
public
|
addMetaData(string $key, string|array $value)
Add Meta Data attached to TempFile
Add Meta Data attached to TempFile
|
#
|
public
|
getMetaData(string $key): string|array
Read Meta Data attached with TempFile
Read Meta Data attached with TempFile
|
#
|
public
|
isComponent(string $key): boolean
Check if Component Exist in TempFile
Check if Component Exist in TempFile
Parameters
$key |
component name or id in HTML code
|
|
#
|
public
|
getComponent(string $key): Control
Get Component
Parameters
$key |
component name or id in HTML code
|
|
#
|
public
|
getComponentSafe(string $key): Control|null
Get Component if exist
Parameters
$key |
component name or id in HTML code
|
|
#
|
public
|
parseComponent(Control $obj, boolean $innerHTML = false): string
Generate HTML for Component Object
$tempobj = new Sphp\tools\TempFile("apps/forms/temp1.front");
$div1 = $tempobj-…
Generate HTML for Component Object
$tempobj = new Sphp\tools\TempFile("apps/forms/temp1.front");
$div1 = $tempobj->getComponent('div1');
echo $tempobj->parseComponent($div1);
Parameters
$innerHTML |
Optional Default=false,
if true then it will not generate component tag in html
|
|
#
|
public
|
getChildrenWrapper($compobj): NodeTag
Wrap All Children of Component as Node Object.
$tempobj = new Sphp\tools\TempFile("apps/forms/temp1.front");
$div1 = …
Wrap All Children of Component as Node Object.
$tempobj = new Sphp\tools\TempFile("apps/forms/temp1.front");
$div1 = $tempobj->getComponent('div1');
$node1 = $tempobj->getChildrenWrapper($div1);
echo $tempobj->parseComponentChildren($node1);
|
#
|
public
|
parseComponentChildren(NodeTag $obj): string
Generate HTML for Component Children
Generate HTML for Component Children
|
#
|