include/connectors/component.php
\component
Connector component
- Api
Properties
Methods
fillBean(
\$args $args
=
array(), \$module $module
=
null, \$bean $bean
=
null
)
:
void
fillBean This function wraps the call to getItem, but takes an additional SugarBean argument and loads the SugarBean's fields with the results as defined in the connector loadBean configuration mapping
Name | Type | Description |
---|---|---|
$args | \$args | Array of arguments to pass into getItem |
$module | \$module | String value of the module to map bean to |
$bean | \$bean | SugarBean instance to load values into |
Exception | Description |
---|---|
\Exception | Thrown if results could not be loaded into bean |
fillBeans(
\$args $args
=
array(), \$module $module
=
null, \$bean $beans
=
array()
)
:
void
fillBeans This function wraps the call to getList, but takes an additional Array argument and loads the SugarBean's fields with the results as defined in the connector loadBean configuration mapping
Name | Type | Description |
---|---|---|
$args | \$args | Array of arguments to pass into getItem |
$module | \$module | String value of the module to map bean to |
$beans | \$bean | Array to load SugarBean intances into |
Exception | Description |
---|---|
\Exception | Thrown if errors are found |
getConfig(
)
:
\$config
getConfig Returns the configuration Array as definied in the config.php file
Type | Description |
---|---|
\$config | Array of the configuration mappings as defined in config.php |
getFieldValue(
$bean, $result, $source_field
)
:
void
Name | Type | Description |
---|---|---|
$bean | ||
$result | ||
$source_field |
save(
\SugarBean $bean
)
:
void
Given a bean, persist it to a data source
Name | Type | Description |
---|---|---|
$bean | \SugarBean |
setConfig(
array $config
)
:
void
setConfig Used by the Factories to set the config on the corresponding object
Name | Type | Description |
---|---|---|
$config | array | this file will be specified in config file corresponding to the wrapper or data source we are using. The name would be something like hoovers.php if we are using the hoovers data source or hoovers wrapper and it would exist in the same directory as the connector and/or wrapper. Note that the confing specified at the connector level takes precendence over the config specified at the wrapper level. This logic is performed in ConnectorFactory.php |