DataService/Batch.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Package
Default  

\Batch

Package: Default
This class contains code for Batch Processing.

Properties

>VPropertyprivatearray $batchRequests
batch requests
Details
Type
array
>VPropertyprivatearray $batchResponses
batch responses
Details
Type
array
>VPropertypublicarray $intuitBatchItemResponses
Intuit batch item responses list.
Details
Type
array
>VPropertyprivate\IEntitySerializer $responseSerializer
serializer to be used.
Details
Type
\IEntitySerializer
>VPropertyprivate\IRestHandler $restHandler
rest handler object.
Details
Type
\IRestHandler
>VPropertyprivate\ServiceContext $serviceContext
service context object.
Details
Type
\ServiceContext

Methods

methodpublicAddEntity( $entity,  $id,  $operation) : void

Adds the specified query.

Parameters
NameTypeDescription
$entity
$id
$operation
methodpublicAddQuery(string $query, string $id) : void

Adds the specified query.

Parameters
NameTypeDescription
$querystring

IDS query.

$idstring

unique batchitem id.

methodpublicCount() : integer

Gets the count.

Returns
TypeDescription
integercount
methodpublicExecute() : void

This method executes the batch request.

methodpublicIntuitBatchResponse(string $id) : void

Gets the IntuitBatchResponse with the specified id.

Parameters
NameTypeDescription
$idstring

unique batchitem id

methodpublicIterateFaultAndPrepareException( $fault) : \IdsException

Prepare IdsException out of Fault object.

Parameters
NameTypeDescription
$fault
Returns
TypeDescription
\IdsExceptionIdsException object.
methodprivateProcessBatchItemResponse( $oneXmlObj) : \IntuitBatchResponse

process batch item response

Parameters
NameTypeDescription
$oneXmlObj
Returns
TypeDescription
\IntuitBatchResponseIntuitBatchResponse object.
methodpublicReadOnlyCollection() : void

Gets list of entites in case ResponseType is Report.

methodpublicRemove( $id) : void

Removes batchitem with the specified batchitem id.

Parameters
NameTypeDescription
$id
methodpublicRemoveAll() : void

Remove all the batchitem requests.

methodpublic__construct( $serviceContext,  $restHandler) : void

Initializes a new instance of the Batch class.

Parameters
NameTypeDescription
$serviceContext

The service context.

$restHandler

The rest handler.

methodprivateapplyAttributes(\IntuitBatchResponse $batchResponse, \SimpleXMLElement $simpleXML) : void

Maps some values from the response xml to the result instance object

Parameters
NameTypeDescription
$batchResponse\IntuitBatchResponse
$simpleXML\SimpleXMLElement
methodprivatearrayToMessageAndCode( $array) : void

Parameters
NameTypeDescription
$array
methodprivatecollectErrors( $fault) : void

Parameters
NameTypeDescription
$fault
methodprotectedgetRestHandler() : \SyncRestHandler

Returns handler to communicate with service

Returns
TypeDescription
\SyncRestHandler
methodprivateverifyFault( $fault) : void

Parameters
NameTypeDescription
$fault

\OperationEnum

Package: Default
Describes operations that can be included in a batch

Constants

>VConstantstring  create = "create"
create Operation
create
string

create

>VConstantstring  update = "update"
update Operation
update
string

update

>VConstantstring  sparseupdate = "sparse update"
sparse update Operation
sparseupdate
string

sparseupdate

>VConstantstring  delete = "delete"
delete Operation
delete
string

delete

>VConstantstring  void = "void"
void Operation
void
string

void

>VConstantstring  query = "query"
query Operation
query
string

query

>VConstantstring  report = "report"
report Operation
report
string

report

Documentation was generated by phpDocumentor 2.8.5.