Constructing an Engine
- final public function __construct() — Construct a new storage engine.
Engine Metadata
- abstract public function getEngineIdentifier() — Return a unique, nonempty string which identifies this storage engine. This is used to look up the storage engine when files needs to be read or deleted. For instance, if you store files by giving them to a duck for safe keeping in his nest down by the pond, you might return 'duck' from this method.
- abstract public function getEnginePriority() — Prioritize this engine relative to other engines.
- abstract public function canWriteFiles() — Return `true` if the engine is currently writable.
- public function hasFilesizeLimit() — Return `true` if the engine has a filesize limit on storable files.
- public function getFilesizeLimit() — Return maximum storable file size, in bytes.
- public function isTestEngine() — Identifies storage engines that support unit tests.
- public function isChunkEngine() — Identifies chunking storage engines.
Managing File Data
- abstract public function writeFile($data, $params) — Write file data to the backing storage and return a handle which can later be used to read or delete it. For example, if the backing storage is local disk, the handle could be the path to the file.
- abstract public function readFile($handle) — Read the contents of a file previously written by @{method:writeFile}.
- abstract public function deleteFile($handle) — Delete the data for a file previously written by @{method:writeFile}.
Loading Storage Engines
- public static function loadStorageEngines($length) — Select viable default storage engines according to configuration. We'll select the MySQL and Local Disk storage engines if they are configured to allow a given file.
- public static function loadAllEngines()
- private static function loadProductionEngines()
- public static function loadWritableEngines()
- public static function loadWritableChunkEngines()
Other Methods
- public static function getChunkThreshold() — Return the largest file size which can not be uploaded in chunks.
- public function getRawFileDataIterator($file, $begin, $end, $format)
- public function newIntegrityHash($data, $format)