ContainerMigration
in package
Class responsible for migrating the contents of one container to another
Table of Contents
- $defaults : mixed
- $newContainer : Container
- $oldContainer : Container
- $options : Collection
- $readQueue : Batch
- $writeQueue : Batch
- factory() : ContainerMigration
- getNewContainer() : Container
- getOldContainer() : Container
- getOptions() : Collection
- setNewContainer() : mixed
- setOldContainer() : mixed
- setOptions() : mixed
- setupReadQueue() : mixed
- Set the read queue as a {@see \Guzzle\Batch\Batch} queue using the {@see \Guzzle\Batch\BatchBuilder}
- setupWriteQueue() : mixed
- Set the write queue as a {@see \Guzzle\Batch\Batch} queue using the {@see \Guzzle\Batch\BatchBuilder}
- transfer() : array<string|int, mixed>
- Initiate the transfer process
- createPutRequest() : EntityEnclosingRequestInterface
- Create a tailored PUT request for each file
- enqueueGetRequests() : mixed
- Create a collection of files to be migrated and add them to the read queue
- sendGetRequests() : array<string|int, mixed>
- Send the read queue (in order to gather more information about individual files)
- getClient() : ClientInterface
Properties
$defaults
protected
mixed
$defaults
= array('read.batchLimit' => 1000, 'read.pageLimit' => 10000, 'write.batchLimit' => 100)
$newContainer
protected
Container
$newContainer
$oldContainer
protected
Container
$oldContainer
$options
protected
Collection
$options
= array()
$readQueue
protected
Batch
$readQueue
$writeQueue
protected
Batch
$writeQueue
Methods
factory()
public
static factory(Container $old, Container $new[, array<string|int, mixed> $options = array() ]) : ContainerMigration
Parameters
- $old : Container
-
Source container
- $new : Container
-
Target container
- $options : array<string|int, mixed> = array()
-
Options that configure process
Return values
ContainerMigration —getNewContainer()
public
getNewContainer() : Container
Return values
Container —getOldContainer()
public
getOldContainer() : Container
Return values
Container —getOptions()
public
getOptions() : Collection
Return values
Collection —setNewContainer()
public
setNewContainer(Container $new) : mixed
Parameters
- $new : Container
Return values
mixed —setOldContainer()
public
setOldContainer(Container $old) : mixed
Parameters
- $old : Container
Return values
mixed —setOptions()
public
setOptions(array<string|int, mixed> $options) : mixed
Parameters
- $options : array<string|int, mixed>
Return values
mixed —setupReadQueue()
Set the read queue as a {@see \Guzzle\Batch\Batch} queue using the {@see \Guzzle\Batch\BatchBuilder}
public
setupReadQueue() : mixed
Return values
mixed —setupWriteQueue()
Set the write queue as a {@see \Guzzle\Batch\Batch} queue using the {@see \Guzzle\Batch\BatchBuilder}
public
setupWriteQueue() : mixed
Return values
mixed —transfer()
Initiate the transfer process
public
transfer() : array<string|int, mixed>
Return values
array<string|int, mixed> —PUT responses
createPutRequest()
Create a tailored PUT request for each file
protected
createPutRequest(Response $response) : EntityEnclosingRequestInterface
Parameters
- $response : Response
Return values
EntityEnclosingRequestInterface —enqueueGetRequests()
Create a collection of files to be migrated and add them to the read queue
protected
enqueueGetRequests() : mixed
Return values
mixed —sendGetRequests()
Send the read queue (in order to gather more information about individual files)
protected
sendGetRequests() : array<string|int, mixed>
Return values
array<string|int, mixed> —Responses
getClient()
private
getClient() : ClientInterface