service/core/SugarRestService.php

Show: inherited
Table of Contents

Constants

Constant  sugarEntry = true

\SugarRestService

Package: SugarCRM

Base class for rest services

All type of web services should provide proper implementation of all the abstract methods

Parent(s)
\SugarWebService

Properties

Propertyprotected  $excludeFunctions= 'array()'
inheritedInherited from: \SugarWebService::$$excludeFunctions
Default valuearray()Details
Type
n/a
Inherited_from
\SugarWebService::$$excludeFunctions  
Propertyprotected  $implementationClass= ''SugarRestServiceImpl''
Default value'SugarRestServiceImpl'Details
Type
n/a
Propertyprotected  $registeredFunc= 'array()'
Default valuearray()Details
Type
n/a
Propertyprotected  $restURL= '""'
Default value""Details
Type
n/a
Propertyprotected  $server= 'null'
inheritedInherited from: \SugarWebService::$$server
Default valuenullDetails
Type
n/a
Inherited_from
\SugarWebService::$$server  

Methods

methodpublic__construct( String $url ) : void

Constructor.

Parameters
Name Type Description
$url String
  • REST url
methodprotected_getTypeName( string $name ) : string

Get Sugar REST class name for input/return type

Parameters
Name Type Description
$name string
Returns
Type Description
string
methodpublicerror( \SoapError $errorObject ) : void

This function sets the fault object on the REST

Parameters
Name Type Description
$errorObject \SoapError
  • This is an object of type SoapError
Details
Access
public  
methodpublicgetRegisteredClass( ) : String

This mehtod returns registry class

Returns
Type Description
String - registryClass
Details
Access
public  
methodpublicgetRegisteredImplClass( ) : String

This mehtod returns registered implementation class

Returns
Type Description
String - implementationClass
Details
Access
public  
methodpublicgetServer( ) : String

This mehtod returns server

Returns
Type Description
String - server
Details
Access
public  
methodpublicregister( Array $excludeFunctions = array() ) : void

Enter description here...

Parameters
Name Type Description
$excludeFunctions Array
  • All the functions you don't want to register
methodpublicregisterClass( String $registryClass ) : void

Sets the name of the registry class

Parameters
Name Type Description
$registryClass String
Details
Access
public  
methodpublicregisterFunction( String $function, Array $input, Array $output ) : void

This method registers all the functions you want to expose as services with REST

Parameters
Name Type Description
$function String
  • name of the function
$input Array
  • assoc array of input values: key = param name, value = param type
$output Array
  • assoc array of output values: key = param name, value = param type
Details
Access
public  
methodpublicregisterImplClass(  $className ) : void

This function registers implementation class name and creates an instance of rest implementation class it will be made on this class object

Parameters
Name Type Description
$className
Details
Access
public  
methodpublicregisterType(  $name,  $typeClass,  $phpType,  $compositor,  $restrictionBase,  $elements,  $attrs,  $arrayType ) : void

Its a no op method

Parameters
Name Type Description
$name
$typeClass
$phpType
$compositor
$restrictionBase
$elements
$attrs
$arrayType
Details
Access
public  
methodpublicserve( ) : void

It passes request data to REST server and sends response back to client

Details
Access
public  
Documentation was generated by DocBlox 0.18.1.