Type

Base Asset Class All Asset Types need to extend this and implement the getHeaders() method.

author

Cody Lundquist

Methods

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

getHeaders() 
abstract

Constructor

__construct(\Munee\Request $Request) 
throws

Arguments

$Request

\Munee\Request

Process all files in the request and set the content

init() 

Sets the Munee\Response class to the AssetType

setResponse(mixed $Response) 
throws

Arguments

$Response

mixed

Grabs the content for the Response class

getContent() : string

Response

string

Return a this requests Last Modified Date.

getLastModifiedDate() : integer

Response

integer

timestamp

Callback method called before filters are run

beforeFilter(string $originalFile, string $cacheFile) 

Arguments

$originalFile

string

$cacheFile

string

Callback function called after filters are run

afterFilter(string $originalFile, string $cacheFile) 

Arguments

$originalFile

string

$cacheFile

string

Callback function called after _getFileContent() is called

afterGetFileContent(string $content) : string

Arguments

$content

string

Response

string

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

setupFile(mixed $originalFile, mixed $cacheFile) 
throws

Arguments

$originalFile

mixed

$cacheFile

mixed

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

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

Arguments

$originalFile

string

$cacheFile

string

Response

string

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

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

Arguments

$originalFile

string

$cacheFile

string

Response

bool|string

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

generateCacheFile(string $file) : string

Arguments

$file

string

Response

string

Properties

Stores the Request Options for the Asset Type

options
var

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

filters
var

Stores the path to the cache directory

cacheDir
var

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

lastModifiedDate
var

Stores the content of the asset

content
var

Reference to the \Munee\Request class

request
var

Reference to the \Munee\Response class

response
var