include/connectors/sources/default/source.php
\source
source is the parent class of any source object.
Properties

\_eapm
$_eapm= 'null'
The ExternalAPI Base that instantiated this connector.
nullDetails- Type
- \_eapm

bool
$_enable_in_admin_display= 'true'
trueDetails- Type
- bool

bool
$_enable_in_admin_mapping= 'true'
trueDetails- Type
- bool

bool
$_enable_in_admin_properties= 'true'
trueDetails- Type
- bool

bool
$_enable_in_admin_search= 'true'
trueDetails- Type
- bool

bool
$_enable_in_hover= 'false'
falseDetails- Type
- bool

bool
$_enable_in_wizard= 'true'
trueDetails- Type
- bool

bool
$_has_testing_enabled= 'false'
falseDetails- Type
- bool
Methods

filterAllowedModules(
array $moduleList
)
:
arrayFilter which modules are allowed to connect
| Name | Type | Description |
|---|---|---|
| $moduleList | array |
| Type | Description |
|---|---|
| array | Allowed modules |

getFieldsWithParams(
string $param_name, string $param_value
)
:
arrayGiven a parameter in a vardef field, return the list of fields that match the param and value
| Name | Type | Description |
|---|---|---|
| $param_name | string | |
| $param_value | string |
| Type | Description |
|---|---|
| array |

getItem(
\$args $args
=
array(), \$module $module
=
null
)
:
ArraygetItem Returns an array containing a key/value pair(s) of a connector record. To be overridden by the implementation source.
| Name | Type | Description |
|---|---|---|
| $args | \$args | Array of arguments to search/filter by |
| $module | \$module | String optional value of the module that the connector framework is attempting to map to |
| Type | Description |
|---|---|
| Array | of key/value pair(s) of connector record; empty Array if no results are found |

getList(
\$args $args
=
array(), \$module $module
=
null
)
:
ArraygetList Returns a nested array containing a key/value pair(s) of a connector record. To be overridden by the implementation source.
| Name | Type | Description |
|---|---|---|
| $args | \$args | Array of arguments to search/filter by |
| $module | \$module | String optional value of the module that the connector framework is attempting to map to |
| Type | Description |
|---|---|
| Array | of key/value pair(s) of connector record; empty Array if no results are found |

getRequiredConfigFields(
)
:
\$fieldsgetRequiredConfigFields This method returns an Array of the configuration keys that are required for the Connector.
Subclasses should set the class variable _required_config_fields to return an Array of keys as specified in the Connector's config.php that are required.
| Type | Description |
|---|---|
| \$fields | Array of Connector config fields that are required |

getRequiredConfigFieldsForButton(
)
:
\$fieldsgetRequiredConfigFieldsForButton This method returns an Array of the configuration keys that are required before the "Get Data" button will include the Connector. We use it as a subset of the $this->_required_config_fields Array.
| Type | Description |
|---|---|
| \$fields | Array of Connector config fields that are required to be set for the "Get Data" button to appear |

hasTestingEnabled(
)
:
\enabledhasTestingEnabled This method is used to indicate whether or not a data source has testing enabled so that the administration interface may call the test method on the data source instance
| Type | Description |
|---|---|
| \enabled | boolean value indicating whether or not testing is enabled |

isEnabledInAdminDisplay(
)
:
booleanisEnabledInAdminDisplay This method indicates whether or not the connector should be shown in the Enable Connectors view.
The Admin views call each source's isEnabledInAdminDisplay method to verify whether or not the connector should be displayed. Connectors that do not have any administrative display settings should set the protected class variable _enable_in_admin_display to false.
| Type | Description |
|---|---|
| boolean | value indicating whether or not the connector is enabled for admin views |

isEnabledInAdminMapping(
)
:
booleanisEnabledInAdminMapping This method indicates whether or not the connector should be shown in the Map Connector Fields view.
The Admin views call each source's isEnabledInAdminMapping method to verify whether or not the connector should be displayed. Connectors that do not have any administrative mapping properties should set the protected class variable _enable_in_admin_mapping to false.
| Type | Description |
|---|---|
| boolean | value indicating whether or not the connector is enabled for admin views |

isEnabledInAdminProperties(
)
:
booleanisEnabledInAdminProperties This method indicates whether or not the connector should be shown in the Set Connector Properties view.
The Admin views call each source's isEnabledInAdminProperties method to verify whether or not the connector should be displayed. Connectors that do not have any administrative properties should set the protected class variable _enable_in_admin_properties to false.
| Type | Description |
|---|---|
| boolean | value indicating whether or not the connector is enabled for admin views |

isEnabledInAdminSearch(
)
:
booleanisEnabledInAdminSearch This method indicates whether or not the connector should be shown in the Manage Connectors Search view.
The Admin views call each source's isEnabledInAdminSearch method to verify whether or not the connector should be displayed. Connectors that do not have any administrative search settings should set the protected class variable _enable_in_admin_search to false.
| Type | Description |
|---|---|
| boolean | value indicating whether or not the connector is enabled for admin views |

isEnabledInHover(
)
:
\$enabledisEnabledInHover This method indicates whether or not the connector should be enabled for the hover links Connectors that do not provide a formatter implementation should not set the protected class variable _enable_in_hover to true.
| Type | Description |
|---|---|
| \$enabled | boolean variable indicating whether or not the connector is enabled for the hover links |

isEnabledInWizard(
)
:
\$enabledisEnabledInWizard This method indicates whether or not the connector should be enabled in the wizard Connectors that do not support the getList/getItem methods via API calls should set the protected class variable _enable_in_wizard to false.
| Type | Description |
|---|---|
| \$enabled | boolean variable indicating whether or not the connector is enabled for the wizard |

isRequiredConfigFieldsForButtonSet(
)
:
\$setisRequiredConfigFieldsForButtonSet This method checks the configuration parameters against the required config fields for the "Get Button" to see if they are set
| Type | Description |
|---|---|
| \$set | boolean value indicating whether or not the required config fields are set |

isRequiredConfigFieldsSet(
)
:
\$setisRequiredConfigFieldsSet This method checks the configuration parameters against the required config fields to see if they are set
| Type | Description |
|---|---|
| \$set | boolean value indicating whether or not the required config fields are set |

log(
string $log_data
)
:
voidAllow data sources to log information
| Name | Type | Description |
|---|---|---|
| $log_data | string |

propertyExists(
string $name
)
:
boolCheck if certain property contains non-empty value
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| bool |

test(
)
:
\resulttest This method is called from the administration interface to run a test of the service It is up to subclasses to implement a test and set _has_testing_enabled to true so that a test button is rendered in the administration interface
| Type | Description |
|---|---|
| \result | boolean result of the test function |