Public Member Functions | |
__construct () | |
get_plugin_names () | |
valid () | |
logged_in () | |
plugin_name () | |
process_command ( $in_andisol_instance, $in_http_method, $in_response_type, $in_path=[], $in_query=[]) | |
Static Public Member Functions | |
static | classes_managed () |
Public Attributes | |
$version | |
The version indicator. More... | |
$error | |
Any errors that occured are kept here. More... | |
Protected Member Functions | |
_process_basalt_parameters () | |
_process_command () | |
_process_token_command ( $in_andisol_instance, $in_http_method, $in_path=[], $in_query=[]) | |
_process_serverinfo_command ( $in_andisol_instance, $in_http_method, $in_path=[], $in_query=[]) | |
_process_ping_command ( $in_andisol_instance, $in_path=[]) | |
_process_baseline_command ( $in_andisol_instance, $in_http_method, $in_command, $in_path=[], $in_query=[]) | |
_baseline_fetch_backup ( $in_andisol_instance) | |
_baseline_bulk_loader () | |
_process_bulk_row ( $in_row_data) | |
_get_xsd () | |
Protected Member Functions inherited from A_CO_Basalt_Plugin | |
_get_short_description ( $in_object) | |
_get_long_description ( $in_object, $in_show_parents=false) | |
_get_xml_header () | |
_get_xsd_header () | |
_process_xsd ( $in_schema_file_path) | |
_condition_response ( $in_response_type, $in_response_as_associative_array=NULL) | |
_get_child_ids ( $in_object) | |
_get_child_handler_data ( $in_object) | |
_process_parameters ( $in_andisol_instance, $in_query) | |
Static Protected Member Functions | |
static | _extract_csv_data ( $in_text_data) |
static | _output_one_line ( $in_line, $in_header_row) |
Static Protected Member Functions inherited from A_CO_Basalt_Plugin | |
static | _get_handler ( $in_classname) |
static | _server_url () |
static | _array2xml ( $in_array) |
Protected Attributes | |
$_andisol_instance | |
This contains the instance of ANDISOL used by this instance. More... | |
$_path | |
This array will contain any path components that are received via GET, PUT, POST or DELETE. More... | |
$_vars | |
This associative array will contain any query variables that are received via GET, PUT, POST or DELETE. More... | |
$_request_type | |
$_response_type | |
This is the reponse type. It is 'json', 'xml' or 'xsd'. More... | |
$_plugin_selector | |
This will be a lowercase string, denoting the plugin selected for the operation. More... | |
Additional Inherited Members | |
Static Protected Attributes inherited from A_CO_Basalt_Plugin | |
static | $_s_cached_list = NULL |
This will contain caches of our handler list. More... | |
BASALT is the principal "interface" class for BAOBAB. It can be extended by writing simple PHP "plugins," and comes with four "default" ones: "people", "places" and "things". "baseline" is a "host" pseudo-plugin.
Definition at line 55 of file co_basalt.class.php.
CO_Basalt::__construct | ( | ) |
Constructor
Definition at line 952 of file co_basalt.class.php.
References __BASALT_VERSION__, _process_basalt_parameters(), and _process_command().
|
protected |
This is a special processing routine that is used to facilitate bulk-loading a BAOBAB server.
The caller must be logged in as a "God" admin, and they upload a CSV file. This file will have certain columns that will be used by this routine to instantiate new records.
This is only of of two Baseline commands called via 'POST'.
Definition at line 774 of file co_basalt.class.php.
References _extract_csv_data(), and _process_bulk_row().
Referenced by _process_baseline_command().
|
protected |
This is a special "God Only" method that fetches a backup of the entire set of databases as a CSV dump. It directly outputs CSV data, and bypasses the return type filtering.
$in_andisol_instance | REQUIRED: The ANDISOL instance to use as the connection to the RVP databases. |
Definition at line 734 of file co_basalt.class.php.
References _output_one_line().
Referenced by _process_baseline_command().
|
staticprotected |
$in_text_data | REQUIRED: The text data to be parsed as new records for the databases. |
Definition at line 80 of file co_basalt.class.php.
Referenced by _baseline_bulk_loader().
|
protected |
This returns the schema for this plugin as XML XSD.
Reimplemented from A_CO_Basalt_Plugin.
Definition at line 940 of file co_basalt.class.php.
References A_CO_Basalt_Plugin\_process_xsd().
|
staticprotected |
This static routine formats one line to a CSV string, then outputs it.
$in_line | REQUIRED: The data line, as an associative array. |
$in_header_row | Required: The header row, as an array of strings. |
Definition at line 113 of file co_basalt.class.php.
Referenced by _baseline_fetch_backup().
|
protected |
This method goes through the passed-in REST query parameters and request paths, and sets up our local instance property with the decoded versions. At the end of this method, the internal $_path property will be an array, containing path components, and, if provided, the $_vars property will have any query parameters. If provided, the query array will be an associative array, with the key being the query element key, and the value being its value. If a query element is provided only as a key, then its value will be set to true.
Definition at line 149 of file co_basalt.class.php.
References get_plugin_names().
Referenced by __construct().
|
protected |
This runs our baseline command.
$in_andisol_instance | REQUIRED: The ANDISOL instance to use as the connection to the RVP databases (ignored). |
$in_http_method | REQUIRED: 'GET' or 'POST' are the only allowed values. |
$in_command | REQUIRED: The command to execute. |
$in_path | OPTIONAL: The REST path, as an array of strings. For the baseline, this should be exactly one element. |
$in_query | OPTIONAL: The query parameters, as an associative array. |
Definition at line 570 of file co_basalt.class.php.
References __BASALT_VERSION__, _baseline_bulk_loader(), _baseline_fetch_backup(), A_CO_Basalt_Plugin\_get_handler(), _process_ping_command(), _process_serverinfo_command(), _process_token_command(), and plugin_name().
Referenced by process_command().
|
protected |
$in_row_data | REQUIRED: The associative array that describes this row. It is in |
Definition at line 908 of file co_basalt.class.php.
Referenced by _baseline_bulk_loader().
|
protected |
This runs our command.
Definition at line 301 of file co_basalt.class.php.
References CO_Lang_Common\$login_error_code_api_key_invalid, CO_Lang_Common\$login_error_code_api_key_mismatch, CO_Lang_Common\$pdo_error_code_invalid_login, and process_command().
Referenced by __construct().
|
protected |
This checks the login status of the IDs passed in. If no IDs, then it checks our own status.
$in_andisol_instance | REQUIRED: The ANDISOL instance to use as the connection to the RVP databases (ignored). |
$in_path | This contains any IDs we are pinging. If omitted, then the current login is checked. |
Definition at line 534 of file co_basalt.class.php.
Referenced by _process_baseline_command().
|
protected |
This runs our baseline serverinfo command.
$in_andisol_instance | REQUIRED: The ANDISOL instance to use as the connection to the RVP databases (ignored). |
$in_http_method | REQUIRED: 'GET' or 'POST' are the only allowed values. |
$in_path | OPTIONAL: The REST path, as an array of strings. For the baseline, this should be exactly one element. |
$in_query | OPTIONAL: The query parameters, as an associative array. |
Definition at line 495 of file co_basalt.class.php.
References $lang, __ANDISOL_VERSION__, __BADGER_VERSION__, __BASALT_VERSION__, __CHAMELEON_VERSION__, and __COBRA_VERSION__.
Referenced by _process_baseline_command().
|
protected |
This runs our baseline token command.
$in_andisol_instance | REQUIRED: The ANDISOL instance to use as the connection to the RVP databases (ignored). |
$in_http_method | REQUIRED: 'GET' or 'POST' are the only allowed values. |
$in_path | OPTIONAL: The REST path, as an array of strings. For the baseline, this should be exactly one element. |
$in_query | OPTIONAL: The query parameters, as an associative array. |
Definition at line 416 of file co_basalt.class.php.
Referenced by _process_baseline_command().
|
static |
This returns an array of classnames, handled by this plugin.
Reimplemented from A_CO_Basalt_Plugin.
Definition at line 1172 of file co_basalt.class.php.
CO_Basalt::get_plugin_names | ( | ) |
Definition at line 1136 of file co_basalt.class.php.
References plugin_name().
Referenced by _process_basalt_parameters().
CO_Basalt::logged_in | ( | ) |
Definition at line 1154 of file co_basalt.class.php.
CO_Basalt::plugin_name | ( | ) |
Reimplemented from A_CO_Basalt_Plugin.
Definition at line 1162 of file co_basalt.class.php.
References _PLUGIN_NAME_.
Referenced by _process_baseline_command(), and get_plugin_names().
CO_Basalt::process_command | ( | $in_andisol_instance, | |
$in_http_method, | |||
$in_response_type, | |||
$in_path = [] , |
|||
$in_query = [] |
|||
) |
This runs our baseline command.
$in_andisol_instance | REQUIRED: The ANDISOL instance to use as the connection to the RVP databases (ignored). |
$in_http_method | REQUIRED: 'GET' or 'POST' are the only allowed values. |
$in_response_type | REQUIRED: 'json', 'csv', 'xml' or 'xsd' -the response type. |
$in_path | OPTIONAL: The REST path, as an array of strings. For the baseline, this should be exactly one element. |
$in_query | OPTIONAL: The query parameters, as an associative array. |
Reimplemented from A_CO_Basalt_Plugin.
Definition at line 1182 of file co_basalt.class.php.
References A_CO_Basalt_Plugin\_condition_response(), and _process_baseline_command().
Referenced by _process_command().
CO_Basalt::valid | ( | ) |
Definition at line 1146 of file co_basalt.class.php.
|
protected |
This contains the instance of ANDISOL used by this instance.
Definition at line 56 of file co_basalt.class.php.
|
protected |
This array will contain any path components that are received via GET, PUT, POST or DELETE.
Definition at line 57 of file co_basalt.class.php.
|
protected |
This will be a lowercase string, denoting the plugin selected for the operation.
Definition at line 67 of file co_basalt.class.php.
|
protected |
This will contain the HTTP Request Type, in uppercase. It will be one of:
Definition at line 59 of file co_basalt.class.php.
|
protected |
This is the reponse type. It is 'json', 'xml' or 'xsd'.
Definition at line 66 of file co_basalt.class.php.
|
protected |
This associative array will contain any query variables that are received via GET, PUT, POST or DELETE.
Definition at line 58 of file co_basalt.class.php.
CO_Basalt::$error |
Any errors that occured are kept here.
Definition at line 70 of file co_basalt.class.php.
CO_Basalt::$version |
The version indicator.
Definition at line 69 of file co_basalt.class.php.