\Ceo\Core\AdaptersImageAdapter

Base image adapter

Summary

Methods
Properties
Constants
adapterFor()
canHandle()
__construct()
getType()
getDimensions()
toImage()
getIptc()
getExif()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
registerAdapters()
isAnimated()
$adapters
$file
$temp_path
N/A

Properties

$adapters

$adapters : 

Type

$file

$file : 

Type

$temp_path

$temp_path : 

Type

Methods

adapterFor()

adapterFor(array  $file, string  $path) : mixed

Locate the first adapter that's able to handle a file.

Each adapter determines its ability to handle a particular file

Parameters

array $file

JSON file information

string $path

Temp file path

Returns

mixed —

Adapter instance if found, false otherwise

canHandle()

canHandle(array  $file, string  $temp_path) : boolean

Determine if the adapter can handle the file type

Parameters

array $file

File info

string $temp_path

temporary path

Returns

boolean

__construct()

__construct(  $file = null,   $temp_path = null) 

Parameters

$file
$temp_path

getType()

getType() : string

Adapter type

Returns

string —

Image

getDimensions()

getDimensions() : mixed

Get the original file dimensions, if possible.

Returns NULL otherwise

Returns

mixed —

Array with 'height', 'width' keys. NULL if not able to extract dimensions

toImage()

toImage(array  $size = array(), string  $path = false) : string

Convert to preview image

Return NULL if not possible

Size array MUST allow for either height and/or width to be set without flipping the heck out.

Keep in mind the return string path is temporary and should be processed accordingly

Parameters

array $size

dims

string $path

source path

Returns

string —

output path

getIptc()

getIptc() : array

Return all encoded IPTC data

Returns

array

getExif()

getExif() : array

Return all encoded EXIF data

Returns

array

registerAdapters()

registerAdapters() : boolean

Register all adapters

Returns

boolean

isAnimated()

isAnimated(  $path) 

Parameters

$path