Omeka_File_Derivative_AbstractStrategy
Package: File\Derivative\Strategy
- class Omeka_File_Derivative_AbstractStrategy
implements Omeka_File_Derivative_StrategyInterface
Abstract class for pluggable file derivative creation strategies.
- property Omeka_File_Derivative_AbstractStrategy::$_options
protected
- Omeka_File_Derivative_AbstractStrategy::setOptions($options)
Set options for the derivative strategy.
- Parameters:
$options (
array
) –
- Omeka_File_Derivative_AbstractStrategy::getOptions()
Get the options for the strategy.
- Returns:
array
- Omeka_File_Derivative_AbstractStrategy::getOption($name, $default = null)
Get the value for the specified option.
- Parameters:
$name (
string
) – Name of the option to get$default (
mixed
) – Default value to return if the option is missing. Defaults to null.- Returns:
mixed
- Omeka_File_Derivative_AbstractStrategy::createImage($sourcePath, $destPath, $type, $sizeConstraint, $mimeType)
Create an derivative of the given image.
- Parameters:
$sourcePath (
string
) – Local path to the source file.$destPath (
string
) – Local path to write the derivative to.$type (
string
) – The type of derivative being created.$sizeConstraint (
int
) – Size limitation on the derivative.$mimeType (
string
) – MIME type of the original file.- Returns:
bool