|
file-fetcher
|
A processor represents a specific way of getting data from a server to produce a file.
The FileFetcher::FileFetcher class relies on processors to do the work. In multiple places through out the process of fetching a file, the FileFetcher::FileFetcher asks the processor classes for information or to do some work.
The majority of information passed to the Processors from the FileFetcher::FileFetcher comes in an array: $state. The array looks like this:
Public Member Functions | |
| isServerCompatible (array $state) | |
| setupState (array $state) | |
| copy (array $state, Result $result, int $timeLimit=PHP_INT_MAX) | |
| isTimeLimitIncompatible () | |
| FileFetcher\Processor\ProcessorInterface::copy | ( | array | $state, |
| Result | $result, | ||
| int | $timeLimit = PHP_INT_MAX |
||
| ) |
Copying data from the "source location" into a file.
Implemented in FileFetcher\Processor\Remote, FileFetcher\Processor\LastResort, and FileFetcher\Processor\Local.
| FileFetcher\Processor\ProcessorInterface::isServerCompatible | ( | array | $state | ) |
Whether the server holding the "file" will work with this processor.
Implemented in FileFetcher\Processor\LastResort, FileFetcher\Processor\Remote, and FileFetcher\Processor\Local.
| FileFetcher\Processor\ProcessorInterface::isTimeLimitIncompatible | ( | ) |
Whether the processor can deal with time limits.
Implemented in FileFetcher\Processor\Remote, FileFetcher\Processor\LastResort, and FileFetcher\Processor\Local.
| FileFetcher\Processor\ProcessorInterface::setupState | ( | array | $state | ) |
An opportunity to modify the state before attempting to fetch the file.
Implemented in FileFetcher\Processor\Remote, FileFetcher\Processor\Local, and FileFetcher\Processor\LastResort.
1.8.17