include/externalAPI/ExternalAPIFactory.php

Show: inherited
Table of Contents

\ExternalAPIFactory

Package: SugarCRM

Provides a factory to list, discover and create external API calls

Main features are to list available external API's by supported features, modules and which ones have access for the user.

Api
 

Methods

methodpublicclearCache( ) : void
static

Clear API cache file

methodpublicfilterAPIList( array $apiFullList ) : array
static

Filter the list of APIs, removing disabled ones

Parameters
Name Type Description
$apiFullList array
Returns
Type Description
array Filtered list
methodpublicgetModuleDropDown( string $moduleName, bool $ignoreAuth = false, bool $addEmptyEntry = false ) : void
static

Get the array of API names available for cetain module

Parameters
Name Type Description
$moduleName string
$ignoreAuth bool

Ignore if we have authentication details or not

$addEmptyEntry bool

Add empty entry?

methodpubliclistAPI( string $module = '', bool $ignoreAuth = false ) : \API
static

Lists the available API's for a module or all modules, and possibly ignoring if the user has auth information for that API even if it is required

Parameters
Name Type Description
$module string

Which module name you are searching for, leave blank to find all API's

$ignoreAuth bool

Ignore API's demands for authentication (used to get a complete list of modules

Returns
Type Description
\API class
methodpublicloadAPI( string | bool $apiName,  $ignoreAuth = false ) : \ExternalAPIBase
static

This will hand back an initialized class for the requested external API, it will also load in the external API password information into the bean.

Parameters
Name Type Description
$apiName string | bool

The name of the requested API ( known API's can be listed by the listAPI() call )

$ignoreAuth
Returns
Type Description
\ExternalAPIBase API plugin
methodpublicloadFullAPIList( bool $forceRebuild = false, bool $ignoreDisabled = false ) : array
static

Get the list of available APIs

Parameters
Name Type Description
$forceRebuild bool
$ignoreDisabled bool

Should we ignore disabled status?

Returns
Type Description
array
Documentation was generated by DocBlox 0.18.1.