include/connectors/component.php

Show: inherited
Table of Contents

\component

Package: SugarCRM

Connector component

Api
 

Properties

Propertyprotected  $_has_testing_enabled= 'false'
Default valuefalseDetails
Type
n/a
Propertyprotected  $_source= ''
Details
Type
n/a

Methods

methodpublic__construct( ) : void

methodpublicfillBean( \$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

Parameters
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

Throws
Exception Description
\Exception Thrown if results could not be loaded into bean
methodpublicfillBeans( \$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

Parameters
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

Throws
Exception Description
\Exception Thrown if errors are found
methodpublicgetConfig( ) : \$config

getConfig Returns the configuration Array as definied in the config.php file

Returns
Type Description
\$config Array of the configuration mappings as defined in config.php
methodpublicgetFieldDefs( ) : void

methodprivategetFieldValue(  $bean,  $result,  $source_field ) : void

Parameters
Name Type Description
$bean
$result
$source_field
methodpublicgetMapping( ) : void

methodpublicgetModuleFieldDef(  $module,  $field ) : void

Parameters
Name Type Description
$module
$field
methodpublicgetModuleMapping(  $module ) : void

Parameters
Name Type Description
$module
methodpublicgetSource( ) : void

methodpublicinit( ) : void

methodpublicloadConfig(  $persister = null ) : void

Parameters
Name Type Description
$persister
methodpublicmapInput(  $inputData,  $module ) : void

mapInput

Parameters
Name Type Description
$inputData
$module
methodpublicmapOutput(  $bean,  $result ) : void

Parameters
Name Type Description
$bean
$result
methodpublicsave( \SugarBean $bean ) : void

Given a bean, persist it to a data source

Parameters
Name Type Description
$bean \SugarBean
methodpublicsaveConfig(  $persister = null ) : void

Parameters
Name Type Description
$persister
methodpublicsetConfig( array $config ) : void

setConfig Used by the Factories to set the config on the corresponding object

Parameters
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

methodpublicsetMapping(  $map = array() ) : void

Parameters
Name Type Description
$map
methodpublicsetSource(  $source ) : void

Parameters
Name Type Description
$source
Documentation was generated by DocBlox 0.18.1.