Use
Last updated on
30 April 2025
API Calls
Your code should try to exclusively use API calls.
Here is an example of how to call the fictitious graduateAllProspects function.
...
$results = sonisweb_integration_api("CFC.graduateAllProspects", "graduateThemAll", "yes",
array(array('adminUsername', '@username'),
array('reason', $reason)));
...
What those things mean.
$resultsholds the results returned by the function.sonisweb_integration_api()The function that actually calls the SONISWEB API.CFC.graduateAllProspectsThe location of the API call. See your documentation.graduateThemAllThe actual function name you are calling."yes"This is a yes no flag that specifies if the function returns a variable (yes) or outputs text (no). (If one doesn't work try the other.)array(array('adminUsername', '@username'), array('reason', $reason))The arguments required by thegraduateThemAllfunction.array('adminUsername', '@username')Argument name is adminUsername, value is @username (Note: @username is a special value. It will dynamically be replaced by the Administrative Username stored by this module. @password will be similarly be replaced.)array('reason', $reason)Argument name is reason, Argument Value will be$reason
SQL Calls
This functionality should only be used sparingly.
...
$results = sonisweb_integration_sql($sql);
...
sonisweb_integration_sql()The function that actually makes the SONISWEB API call.$sqlThe SQL Command you wish to run. (Note: Tha API will only run select commands. However, you are still responsible for preventing SQL Injection attacks$resultsThe SQL results. They are returned in a 2D associative array with the rows numbered and the columns are named. (i.e.0 => ([course] => 'English', ...), 1 => ([course] => 'Math', ...))
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion