Public Member Functions | |
__construct ($db, $type="MySQL") | |
attach_form ($form, $form_name) | |
set_encoding ($encoding) | |
fill_query () | |
dynamic_loading ($count) | |
enable_log ($path=true, $client_log=false) | |
is_select_mode () | |
parse_request () | |
customize_config () | |
render_table ($table, $id, $field) | |
render () | |
render_sql ($sql, $id, $field) | |
render_set ($res) | |
output_xml () | |
Public Attributes | |
$db | |
DBWrapper object. | |
$config | |
configuration hash | |
$sql | |
SQLMaster object. | |
$event | |
EventMaster object. | |
$access | |
AccessMaster object. | |
Protected Member Functions | |
end_run () | |
set_alias ($data) | |
set_config ($name, $str, $array_mode=false) | |
get_query ($sql="") | |
output_error () | |
output_header () | |
log ($str, $data="") | |
Protected Attributes | |
$_log | |
LogMaster object. | |
$dload | |
flag of dyn. loading mode | |
$output | |
output buffer | |
$form | |
FormConnector object, if any. | |
$client_log | |
flag of client log output | |
$dbtype | |
type of database as string ( MySQL of Postgre ) | |
$editing | |
flag of edit mode ( response for dataprocessor ) | |
$encoding | |
assigned encoding (UTF-8 by default) | |
Private Attributes | |
$exec_time | |
execution time counter |
Has not practical usage except of storing methods common for all connectors
__construct | ( | $ | db, | |
$ | type = "MySQL" | |||
) |
constructor
Here initilization of all Masters occurs, execution timer initialized
db | db connection resource | |
type | string , which hold type of database ( MySQL or Postgre ), optional |
Reimplemented in FormConnector, GridConnector, TreeConnector, and TreeGridConnector.
attach_form | ( | $ | form, | |
$ | form_name | |||
) |
connect form to the existing connector (not implemented)
form | FormConnector object | |
form_name | name of form tag on HTML page |
customize_config | ( | ) |
customize config by rules and modes from incoming request
Reimplemented in FormConnector, and GridConnector.
dynamic_loading | ( | $ | count | ) |
enable or disable dynamic loading mode
count | count of rows loaded from server, actual only for grid-connector, can be skiped in other cases. If value is a false or 0 - dyn. loading will be disabled |
enable_log | ( | $ | path = true , |
|
$ | client_log = false | |||
) |
enable logging
path | path to the log file. If set as false or empty strig - logging will be disabled | |
client_log | enable output of log data to the client side |
end_run | ( | ) | [protected] |
end processing
stop execution timer, kill the process
fill_query | ( | ) |
prepare DBQuery based on config
get_query | ( | $ | sql = "" |
) | [protected] |
is_select_mode | ( | ) |
provides infor about current processing mode
log | ( | $ | str, | |
$ | data = "" | |||
) | [protected] |
log some info in error log
str | sting data which will be logged | |
data | additional data , which will be attached to log record |
output_error | ( | ) | [protected] |
output error message in stdout
Reimplemented in FormConnector.
output_header | ( | ) | [protected] |
output xml headers
method attempts to clear all previously outputed format
output_xml | ( | ) |
output fetched data as XML
Reimplemented in ComboConnector, FormConnector, GridConnector, TreeConnector, and TreeGridConnector.
parse_request | ( | ) |
parse incoming request, detects commands and modes
Reimplemented in ComboConnector, FormConnector, GridConnector, and TreeConnector.
render | ( | ) |
render self
process commands, output requested data as XML
Reimplemented in ComboConnector, FormConnector, GridConnector, and TreeConnector.
render_set | ( | $ | res | ) |
render from DB resultset
res | DB resultset process commands, output requested data as XML |
Reimplemented in ComboConnector, FormConnector, GridConnector, TreeConnector, and TreeGridConnector.
render_sql | ( | $ | sql, | |
$ | id, | |||
$ | field | |||
) |
config connector based on table
sql | sql query used as base of configuration | |
id | name of id field | |
field | list of fields names |
Reimplemented in ComboConnector, FormConnector, and GridConnector.
render_table | ( | $ | table, | |
$ | id, | |||
$ | field | |||
) |
config connector based on table
table | name of table in DB | |
id | name of id field | |
field | list of fields names |
Reimplemented in ComboConnector, FormConnector, and GridConnector.
set_alias | ( | $ | data | ) | [protected] |
extract alias part from SQL compatible name longer description
data | field name as a string |
set_config | ( | $ | name, | |
$ | str, | |||
$ | array_mode = false | |||
) | [protected] |
parse config strings to receive valid names and aliases of configuration params longer description
name | name of config entry | |
str | string which will be parsed | |
array_mode | count incoming data as single parameter or as an array of parameres |
set_encoding | ( | $ | encoding | ) |
set xml encoding
methods sets only attribute in XML, no real encoding conversion occurs
encoding | value which will be used as XML encoding |
$_log [protected] |
LogMaster object.
$access |
AccessMaster object.
$client_log [protected] |
flag of client log output
$config |
configuration hash
$db |
DBWrapper object.
$dbtype [protected] |
type of database as string ( MySQL of Postgre )
$dload [protected] |
flag of dyn. loading mode
$editing [protected] |
flag of edit mode ( response for dataprocessor )
$encoding [protected] |
assigned encoding (UTF-8 by default)
$event |
EventMaster object.
$exec_time [private] |
execution time counter
$form [protected] |
FormConnector object, if any.
$output [protected] |
output buffer
$sql |
SQLMaster object.