Image

Extends \Munee\Asset\Type

Handles Images

author

Cody Lundquist

Methods

Checks to see if cache exists and is the latest, if it does, return it

checkCache(string $originalFile, string $cacheFile) : bool|string
inherited

Arguments

$originalFile

string

$cacheFile

string

Response

bool|string

Checks to see if the file exists and then copies it to the cache folder for further manipulation

setupFile(mixed $originalFile, mixed $cacheFile) 
inherited
throws

Arguments

$originalFile

mixed

$cacheFile

mixed

All Type Sub-Classes must create this method to set their additional headers

getHeaders() 
inherited abstract

Check to make sure the referrer domain is the same as the domain where the image exists.

checkReferrer() 
throws

Check number of allowed resizes within a set time limit

checkNumberOfAllowedFilters(string $checkImage) 
throws

Arguments

$checkImage

string

Checks the 'placeholders' Request Option to see if placeholders should be used for missing images It uses a wildcard syntax (*) to see which placeholder should be used for a particular set of images.

parsePlaceholders(string $file) : boolean|string
throws

Arguments

$file

string

Response

boolean|string

Grabs an image by URL from another server

getImageByUrl(string $url) : string

Arguments

$url

string

Response

string

Constructor

__construct(\Munee\Request $Request) 
inherited
throws

Arguments

$Request

\Munee\Request

Process all files in the request and set the content

init() 
inherited

Sets the Munee\Response class to the AssetType

setResponse(mixed $Response) 
inherited
throws

Arguments

$Response

mixed

Grabs the content for the Response class

getContent() : string
inherited

Response

string

Return a this requests Last Modified Date.

getLastModifiedDate() : integer
inherited

Response

integer

timestamp

Callback method called before filters are run

beforeFilter(string $originalFile, string $cacheFile) 
inherited

Arguments

$originalFile

string

$cacheFile

string

Callback function called after filters are run

afterFilter(string $originalFile, string $cacheFile) 
inherited

Arguments

$originalFile

string

$cacheFile

string

Callback function called after _getFileContent() is called

afterGetFileContent(string $content) : string
inherited

Arguments

$content

string

Response

string

Grab a files content but check to make sure it exists first

getFileContent(string $originalFile, string $cacheFile) : string
inherited
throws

Arguments

$originalFile

string

$cacheFile

string

Response

string

Generate File Name Hash based on filename, request params and request options

generateCacheFile(string $file) : string
inherited

Arguments

$file

string

Response

string

Properties

Stores the Request Options for the Asset Type

options
inherited
var

Stores the specific placeholder that will be used for this requested asset, if any.

placeholder
var

Stores the list of filters that will be applied to the requested asset.

filters
inherited
var

Stores the path to the cache directory

cacheDir
inherited
var

Stores the last modified date (Epoch) for the requested asset

lastModifiedDate
inherited
var

Stores the content of the asset

content
inherited
var

Reference to the \Munee\Request class

request
inherited
var

Reference to the \Munee\Response class

response
inherited
var