MediaPaths
class MediaPaths
Class MediaPaths abstracts away paths that we can use and also has a few helper methods for other classes to use
Methods
Create a new Media Path Helper the purpose of this class is to determine paths for media (and versions of media)
Gets the basepath for us
Check to see if a file exists or not
Create an empty file in this location
Gets the versioned path to this $url path
Gets the versioned path to this file
Make this path relative to public directory
Returns the zencoder url for this filename
Downloads the image so that we can re-use it later and crop it and resize it accordingly
Returns true or false depending on if this is an image url or not
Details
at line 24
__construct(string $basepath = null, string $baseurl = null, null $Config = null)
Create a new Media Path Helper the purpose of this class is to determine paths for media (and versions of media)
at line 36
string
basePath()
Gets the basepath for us
at line 47
boolean
fileExists($mediapath)
Check to see if a file exists or not
at line 56
touch($mediapath)
Create an empty file in this location
at line 74
stdClass
fileVersionInfoFromUrl($url)
Gets the versioned path to this $url path
at line 108
stdClass
fileVersionInfo($filePath)
Gets the versioned path to this file
at line 169
string
makeRelativePath($path)
Make this path relative to public directory
at line 180
string
zencoderUrl($filename)
Returns the zencoder url for this filename
at line 198
string
downloadFromUrl($path, $newFilePath = null)
Downloads the image so that we can re-use it later and crop it and resize it accordingly
at line 233
boolean
isUrlPath($url)
Returns true or false depending on if this is an image url or not