Documentation

DownloadSync extends AbstractSync
in package

Downloads and Amazon S3 bucket to a local directory

Table of Contents

Constants

AFTER_TRANSFER  = 's3.sync.after_transfer'
BEFORE_TRANSFER  = 's3.sync.before_transfer'

Properties

$eventDispatcher  : EventDispatcherInterface
$options  : Collection

Methods

__construct()  : mixed
addSubscriber()  : self
Add an event subscriber to the dispatcher
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
getEventDispatcher()  : EventDispatcherInterface
Get the EventDispatcher of the request
setEventDispatcher()  : self
Set the EventDispatcher of the request
transfer()  : mixed
Begin transferring files
createDirectory()  : mixed
createTransferAction()  : CommandInterface|callable
Create a command or special transfer action for the
filterCommands()  : mixed
init()  : mixed
Hook to initialize subclasses
transferCommands()  : mixed
Transfer an array of commands in parallel
transferFiles()  : mixed
Process and transfer a group of files

Constants

AFTER_TRANSFER

public mixed AFTER_TRANSFER = 's3.sync.after_transfer'

BEFORE_TRANSFER

public mixed BEFORE_TRANSFER = 's3.sync.before_transfer'

Properties

Methods

__construct()

public __construct(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>

Associative array of options:

  • client: (S3Client) used to transfer requests
  • bucket: (string) Amazon S3 bucket
  • iterator: (\Iterator) Iterator that yields SplFileInfo objects to transfer
  • source_converter: (FilenameConverterInterface) Converter used to convert filenames
  • *: Any other options required by subclasses

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>

transfer()

Begin transferring files

public transfer() : mixed

createDirectory()

protected createDirectory(mixed $filename) : mixed
Parameters
$filename : mixed
Tags
codeCoverageIgnore

createTransferAction()

Create a command or special transfer action for the

protected createTransferAction(SplFileInfo $file) : CommandInterface|callable
Parameters
$file : SplFileInfo

File used to build the transfer

Return values
CommandInterface|callable

filterCommands()

protected filterCommands(array<string|int, mixed> $commands) : mixed
Parameters
$commands : array<string|int, mixed>

init()

Hook to initialize subclasses

protected init() : mixed
Tags
codeCoverageIgnore

transferCommands()

Transfer an array of commands in parallel

protected transferCommands(array<string|int, mixed> $commands) : mixed
Parameters
$commands : array<string|int, mixed>

Commands to transfer

transferFiles()

Process and transfer a group of files

protected transferFiles(array<string|int, mixed> $files) : mixed
Parameters
$files : array<string|int, mixed>

Files to transfer


        
On this page

Search results