Public Member Functions | |
__construct ($conf=NULL) | |
simpleConf ($configuration) | |
getKeys () | |
set ($key, $value=NULL) | |
get ($key) | |
map ($src, $obj, $verbose=false) | |
message ($msg=NULL) | |
errorCount () | |
open () | |
release () | |
execute ($sql, $verbose=false) | |
mapExecute ($sql, $obj, $verbose=false) | |
getRow ($verbose=false) | |
lastInsertRowId () | |
close () |
WSCORE2 a root object for building MV* based applications
Definition at line 35 of file WSCORE2.php.
WSCORE2::__construct | ( | $ | conf = NULL ) |
__construct: Constructor for WSCORE2 objects.
a | WSCORE2 object or JSON string for attribute settings. |
Reimplemented in SOC_API1C, and SOC_Cache2.
Definition at line 40 of file WSCORE2.php.
References message(), and simpleConf().
Referenced by SOC_Widget::SOC_Widget().
WSCORE2::close | ( | ) |
close - Close the open database connection.
Reimplemented in SOC_API1C.
Definition at line 427 of file WSCORE2.php.
References message().
WSCORE2::errorCount | ( | ) |
errorCount - count the number of error messages in message queue.
Definition at line 197 of file WSCORE2.php.
Referenced by SOC_API1C::_restParse(), SOC_Cache2::createTables(), SOC_API1C::eventLoop(), SOC_API1C::getClasses(), SOC_Cache2::setCache(), simpleConf(), and AIS_SOAP_WS::xmlFromSoap().
WSCORE2::execute | ( | $ | sql, |
$ | verbose = false |
||
) |
execute - run an SQL query against the database.
$sql | - SQL query to run. |
$verbose | - send more messages to message_queue if true. |
Definition at line 305 of file WSCORE2.php.
References message().
Referenced by SOC_Cache2::createTables(), SOC_Cache2::listCache(), mapExecute(), and SOC_Cache2::setCache().
WSCORE2::get | ( | $ | key ) |
get - return the value for a given key or false if not set.
$key | - the key for the value to be retrieved. |
Definition at line 134 of file WSCORE2.php.
Referenced by SOC_API1C::help(), and SOC_Configuration::SOC_Configuration().
WSCORE2::getKeys | ( | ) |
getKeys - return a list of attribute keys for object.
Definition at line 107 of file WSCORE2.php.
WSCORE2::getRow | ( | $ | verbose = false ) |
getRow - get a row from a query result
$verbose | - send more messages to the message queue. |
Definition at line 375 of file WSCORE2.php.
References message().
Referenced by SOC_Cache2::getCache(), and SOC_Cache2::listCache().
WSCORE2::lastInsertRowId | ( | ) |
lastInsertRowId - get the id of the last inserted row.
Definition at line 406 of file WSCORE2.php.
References message().
WSCORE2::map | ( | $ | src, |
$ | obj, | ||
$ | verbose = false |
||
) |
map - map an object's key/value pairs into a template string.
$src | - the template to use. |
$obj | - the data to map into the template. |
$verbose | - if true send more messages to message queue. |
Definition at line 148 of file WSCORE2.php.
References message().
Referenced by mapExecute().
WSCORE2::mapExecute | ( | $ | sql, |
$ | obj, | ||
$ | verbose = false |
||
) |
mapExecute - map an object into a SQL template and run query.
$sql | - SQL template. |
$obj | - Object to map into SQL template. |
$verbose | - send more messages to message_queue if true. |
Definition at line 362 of file WSCORE2.php.
References execute(), and map().
Referenced by SOC_Cache2::getCache().
WSCORE2::message | ( | $ | msg = NULL ) |
message - add a message to the queue or return the entire queue contents and flush the queue.
$msg | - add message to queue of if NULL return queue. |
Definition at line 182 of file WSCORE2.php.
Referenced by __construct(), close(), SOC_Cache2::createTables(), SOC_Widget::error(), SOC_Widget::errors(), execute(), getRow(), lastInsertRowId(), map(), open(), release(), SOC_Cache2::setCache(), and simpleConf().
WSCORE2::open | ( | ) |
open - open a database connection.
Definition at line 210 of file WSCORE2.php.
References message().
WSCORE2::release | ( | ) |
free - free the memory from a SQL query result. Currently only works with MySQL using mysql_free_result
Definition at line 270 of file WSCORE2.php.
References message().
Referenced by SOC_Cache2::getCache(), and SOC_Cache2::listCache().
WSCORE2::set | ( | $ | key, |
$ | value = NULL |
||
) |
set - set a key/value pair as an attribute.
$key | - unique key for key/value pair |
$value | - value to be set or NULL, if NULL then key/value pair will be removed from attributes if exists. |
Definition at line 120 of file WSCORE2.php.
Referenced by SOC_Configuration::SOC_Configuration().
WSCORE2::simpleConf | ( | $ | configuration ) |
simpleConf - read a string which is a colon delimited set of key/value pairs, with one line per pair and where # delimits comments
conf | - A configuration file's content as string (i.e. what you would get from get_file_contents()) |
Definition at line 79 of file WSCORE2.php.
References errorCount(), and message().
Referenced by __construct().