Methods |
public
|
page_init()
Advance
Overload, Event Handler For App Type development
Advance
Overload, Event Handler For App Type development
|
#
|
public
|
page_load()
Advance
Overload, Event Handler For App Type development
Advance
Overload, Event Handler For App Type development
|
#
|
public
|
page_event(string $event, string $evtp)
Advance
Controller Event handler like (url=index-page-contacts.html)
this function gives $event = page and $evtp =…
Advance
Controller Event handler like (url=index-page-contacts.html)
this function gives $event = page and $evtp = contacts
|
#
|
public
|
page_action(string $act, string $event, string $evtp)
Advance
Custom action designer. Default value delete or view or evt.
like for events value = evt
Advance
Custom action designer. Default value delete or view or evt.
like for events value = evt
|
#
|
public
|
page_delete()
Special Event
Delete Event Handler, occur when browser get (url=index-delete.html)
where index is controller of…
Special Event
Delete Event Handler, occur when browser get (url=index-delete.html)
where index is controller of application and application path is in reg.php file
|
#
|
public
|
page_view()
Special Event
View Event Handler, occur when browser get (url=index-view-19.html)
where index is controller of…
Special Event
View Event Handler, occur when browser get (url=index-view-19.html)
where index is controller of application and application path is in reg.php file
view = event name
19 = recid of database table or any other value.
|
#
|
public
|
page_submit()
Special Event
Submit Event Handler, occur when browser post form (url=index.html)
where index is controller of…
Special Event
Submit Event Handler, occur when browser post form (url=index.html)
where index is controller of application and application path is in reg.php file
|
#
|
public
|
page_insert()
Special Event
Insert Event Handler, occur when browser post form (url=index.html) as new form
where index is controller…
Special Event
Insert Event Handler, occur when browser post form (url=index.html) as new form
where index is controller of application and application path is in reg.php file
|
#
|
public
|
page_update()
Special Event
Update Event Handler, occur when browser post form (url=index.html) as filled form
from database with…
Special Event
Update Event Handler, occur when browser post form (url=index.html) as filled form
from database with view_data function
where index is controller of application and application path is in reg.php file
|
#
|
public
|
page_new()
Special Event
New Event Handler, occur when browser get (url=index.html) first time
where index is controller of…
Special Event
New Event Handler, occur when browser get (url=index.html) first time
where index is controller of application and application path is in reg.php file
|
#
|
public
|
page_unload()
Advance
Overload, Event Handler For App Type development
Advance
Overload, Event Handler For App Type development
|
#
|
public
|
getEvent(): string
Get Controller Event name of current request
Get Controller Event name of current request
|
#
|
public
|
getEventParameter(): string
Get Controller Event parameter of current request
Get Controller Event parameter of current request
|
#
|
public
|
readyPage()
Advance
Overload, Event Handler For App Type development
Advance
Overload, Event Handler For App Type development
|
#
|
public
|
init()
Advance
Overload, Event Handler For App Type development
Advance
Overload, Event Handler For App Type development
|
#
|
public
|
Authenticate(string $auth = ""): boolean
Set which user can access this application. Default user is GUEST.
You can set session variable in login app
SphpBase:…
Set which user can access this application. Default user is GUEST.
You can set session variable in login app
SphpBase::sphp_request()->session('logType','ADMIN');
If user is not login with specific type then application exit and
redirect according to the getWelcome function in comp.php
Parameters
$auth |
comma separated list of string. Example:- Authenticate("GUEST,ADMIN") or Authenticate("ADNIN")
|
Returns
true if user type match with session variable logType, never return false
|
#
|
public
|
AuthenticateSVAR(string $auth = "")
Advance
Authorise base on server variables, in session less environment
Advance
Authorise base on server variables, in session less environment
|
#
|
public
|
checkUnAuth(string $param): boolean
Check if user type in session logType = unauthorise
Check if user type in session logType = unauthorise
Parameters
$param |
comma separated list of string. Example:- checkUnAuth("GUEST,ADMIN") or checkUnAuth("ADNIN")
|
Returns
true if user type match with session variable logType
|
#
|
public
|
checkAuth(string $param): boolean
Check if user type in session logType = authorise
Check if user type in session logType = authorise
Parameters
$param |
comma separated list of string. Example:- checkAuth("GUEST,ADMIN") or checkAuth("ADNIN")
|
Returns
true if user type match with session variable logType
|
#
|
public
|
getAuthenticateType(): string
Read logType session variable as User Type of login user which is set in login app
Read logType session variable as User Type of login user which is set in login app
|
#
|
public
|
sesSecure(): Application
Application exit if URL isn't session secure
Application exit if URL isn't session secure
Returns
exit if URL isn't session secure
|
#
|
public
|
forward(string $loc)
Forward request to url
|
#
|
public
|
setDBEngine(MySQL $objdbengine)
Set default Database Engine for execute query and managing connections
Default is MySQL
Set default Database Engine for execute query and managing connections
Default is MySQL
|
#
|
public
|
deleteRec(string $recid = "")
This Function delete the record of database table with generate and execute delete query.
DELETE FROM $tblName WHERE id…
This Function delete the record of database table with generate and execute delete query.
DELETE FROM $tblName WHERE id='$evtp'
$tblName = default table of application
$evtp = getEventParameter()
Parameters
$recid |
If empty then use event parameter as record id.
|
|
#
|
public
|
insertData(array $extra = [])
When Components use Database Binding. Then This Function insert the values to database table from a
component value.…
When Components use Database Binding. Then This Function insert the values to database table from a
component value. This insert a new record in table.
$extra = array()
$extra['table']['datecreate'] = date('Y-m-d)
OR
$extra[]['datecreate'] = date('Y-m-d)
insertData($extra)
Parameters
$extra |
extra fields to insert with query.
|
|
#
|
public
|
viewData(type $form, string $recID = "", string $fldList = "", string $where = "")
When Components use Database Binding. Then This Function Fill the values from database table to a
control value.<br>…
When Components use Database Binding. Then This Function Fill the values from database table to a
control value.
changeable $sql = "SELECT $fldList FROM $tbln $where"
$tbln = use defualt tblName of application or controls dtable attribute
SphpBase::page()->viewData(,,"WHERE id='1'");
SphpBase::page()->viewData('','aname,pass,lst',"WHERE lastname='devel'");
Parameters
$form |
Form control
Read value from database and fill all controls of TempFile object which is bind with field of table.
|
$recID |
Every table should have unique,auto increment and primary filed and default it has name id.
id = record id in table, pass this record id to $recID or if it is empty then it uses SphpBase::page()->getEventParameter()
|
$fldList |
pass comma separated list of table fields or otherwise it is *
|
$where |
WHERE Logic in SQL
|
|
#
|
public
|
updateData(array $extra = [], string $recID = '', string $where = '')
When Components use Database Binding. Then This Function Update the values to database<br> table from a
control value.…
When Components use Database Binding. Then This Function Update the values to database table from a
control value. This update old record in table.
$extra = array()
$extra['table']['dateupdate'] = date('Y-m-d)
OR
$extra[]['dateupdate'] = date('Y-m-d)
updateData($extra)
Parameters
$extra |
extra fields to insert with query.
|
$recID |
Every table should have unique,auto increment and primary filed and default it has name id.
id = record id in table, pass this record id to $recID or if it is empty then it uses SphpBase::page()->getEventParameter()
|
$where |
WHERE Logic in SQL
|
|
#
|