Documentation

ResourceIteratorApplyBatched extends AbstractHasDispatcher
in package

Apply a callback to the contents of a {@see ResourceIteratorInterface}

Will be removed in a future version and is no longer maintained. Use the Batch\ abstractions instead.

Tags
codeCoverageIgnore

Table of Contents

Properties

$batches  : int
$callback  : callable|array<string|int, mixed>
$eventDispatcher  : EventDispatcherInterface
$iterated  : int
$iterator  : ResourceIteratorInterface

Methods

__construct()  : mixed
addSubscriber()  : self
Add an event subscriber to the dispatcher
apply()  : int
Apply the callback to the contents of the resource iterator
dispatch()  : Event
Helper to dispatch Guzzle events and set the event name on the event
getAllEvents()  : array<string|int, mixed>
Get a list of all of the events emitted from the class
getBatchCount()  : int
Get the total number of batches sent
getEventDispatcher()  : EventDispatcherInterface
Get the EventDispatcher of the request
getIteratedCount()  : int
Get the total number of iterated resources
setEventDispatcher()  : self
Set the EventDispatcher of the request

Properties

Methods

apply()

Apply the callback to the contents of the resource iterator

public apply([int $perBatch = 50 ]) : int
Parameters
$perBatch : int = 50

The number of records to group per batch transfer

Return values
int

Returns the number of iterated resources

dispatch()

Helper to dispatch Guzzle events and set the event name on the event

public dispatch(mixed $eventName[, array<string|int, mixed> $context = array() ]) : Event
Parameters
$eventName : mixed

Name of the event to dispatch

$context : array<string|int, mixed> = array()

Context of the event

Return values
Event

Returns the created event object

getAllEvents()

Get a list of all of the events emitted from the class

public static getAllEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results