$version $version : BaaS version This one will never be exposed to the outside world. Type — BaaS Version number
$build $build : BaaS build This one will never be exposed to the outside world. Type — BaaS build number
$sessionTime $sessionTime : Time befor resetting the maximum retries Type — time to reset session token
$saveFilesToDatabase $saveFilesToDatabase : Save files to database? Type — Save files to the database?
$defaultFields $defaultFields : string|array Defaults fields The fields which may be missing on insertion Type string|array — Return this error codes
$defaultTables $defaultTables : string|array Defaults tables The default tables for running BaaS Type string|array — Default tables
$extensions $extensions : string|array Extensions We'll support extensions Type string|array — Extensions array
$userRegistrationDisabled $userRegistrationDisabled : userRegistrationDisabled Is the user registration disabled? Type — userRegistrationDisabled?
$userLoginDisabled $userLoginDisabled : userLoginDisabled Is the user login disabled? Type — userLoginDisabled?
setDatabase() setDatabase( type, hostOrPath, databaseName, username, password) : Set database configuration Parameters type mysql/sqlite hostOrPath Host or Path name databaseName Database name username username password Password Returns —
attachExtension() attachExtension( extensionURL, extensionCall, needsAPIKey = true) : attach Extension Parameters extensionURL Extension url (in regex) extensionCall extensionClass::myFunction needsAPIKey Do we need a API Key to run this? Returns —
setSessionTime() setSessionTime( sessionTimeValue) Set the lifetime of a (user) session Parameters sessionTimeValue Time string like "+1 month"
setBindToIP() setBindToIP( bindToIPValue) Set bind to IP on/off Parameters bindToIPValue On or Off (default false)
setEmailAddress() setEmailAddress( emailAddress) Set the email address Parameters emailAddress email address
setMaximumInvalidTries() setMaximumInvalidTries( setMaximumTries) Set Maximum tries Parameters setMaximumTries Maximum tries
setTriesTime() setTriesTime( setTriesTime) Set Maximum tries (in time) Parameters setTriesTime Time in strtotime format
serve() serve() : mixed|string Serve the BaaS Server. Returns mixed|string — Page contents (JSON/HTML)
tableFromSQLString() tableFromSQLString( sqlQuery) : Get tablename from SQL Query. Supported: SELECT WHATEVER FROM WHERE ... INSERT * INTO X VALUES () DELETE FROM X WHERE ... CREATE TABLE X () Parameters sqlQuery The SQL Query Returns — the table name
invalidRequest() invalidRequest( request = Unknown) : Invalid request Parameters request the type/value Returns — JSON Error.
escapeString() escapeString( insecureInput) : Escape SQL query Parameters insecureInput the unsecure SQL Query Returns — the (more)secure SQL Query
queryWithParameters() queryWithParameters( query, array|string parameters) : SQL Query with parameters Parameters query Query text array|string parameters Query parameters Returns — Query executed
getTableFields() getTableFields( tableName, asJSON = false) : array|string Get table fields (columns) Parameters tableName asJSON Returns array|string — Fieldnames
isTheServerAvailable() isTheServerAvailable( serverAddr) : mixed|string Is the server available? Parameters serverAddr Server address Returns mixed|string — Offline/Online
handleException() handleException( exception) : mixed|string Deal with exceptions. Parameters exception throwed exception Returns mixed|string — JSON String with error (if available)
setHTTPStatusCode() setHTTPStatusCode( code = 200, returnAsText = false) Set the HTTP Status Code Parameters code HTTP Status Code returnAsText
userExists() userExists( userID) : Does the user exists? Parameters userID The user's id Returns — JSON Data.
sessionCreate() sessionCreate( sessionID) : create session Parameters sessionID The session ID Returns — JSON Data.
sessionInvalidate() sessionInvalidate( sessionID) : invalidate session Parameters sessionID The session ID Returns — JSON Data.
sessionAdminInvalidateAll() sessionAdminInvalidateAll( sessionID) : [Administrator] invalidate all sessions Parameters sessionID The session ID Returns — JSON Data.
userAdminLoginEnabled() userAdminLoginEnabled( status) : [Administrator] is login enabled? Parameters status The status Returns — JSON Data.
userAdminRegisterEnabled() userAdminRegisterEnabled( status) : [Administrator] is register enabled? Parameters status The status Returns — JSON Data.
userAdminStatus() userAdminStatus( userID) : [Administrator] set User status Parameters userID The user's id Returns — JSON Data.
userReset() userReset( userID) : Reset userpassword Parameters userID The user's id Returns — JSON Data.
userActivate() userActivate( userID) : Activate user Parameters userID The user's id Returns — JSON Data.
fileExists() fileExists( fileID, asBoolean = false) : File Exists Parameters fileID File identifier asBoolean Return as Boolean? Returns — JSON Data.
fileDownload() fileDownload( fileID) : File Download Parameters fileID File identifier Returns — JSON Data.
fileRemove() fileRemove( fileID) : File Remove Parameters fileID File identifier Returns — JSON Data.
fileUpload() fileUpload( fileID) : File Upload Parameters fileID File identifier Returns — JSON Data.
DBAdmin() DBAdmin( task = index) : Create the Database Admin Web Interface Parameters task Task to execute. Returns — Database Admin Webinterface
isLoggedInAsAdmin() isLoggedInAsAdmin( destroy = false) : Is the current user a admin? Parameters destroy Destroy session? Returns — Logged in state
rowCreate() rowCreate( action) : array|string Create row Parameters action Returns array|string — Fieldnames