PHP Class Devise\Media\MediaPaths

Afficher le fichier Open project: devisephp/cms

Méthodes publiques

Méthode Description
__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)
basePath ( ) : string Gets the basepath for us
downloadFromUrl ( $path, $newFilePath = null ) : string Downloads the image so that we can re-use it later and crop it and resize it accordingly
fileExists ( $mediapath ) : boolean Check to see if a file exists or not
fileVersionInfo ( $filePath ) : stdClass Gets the versioned path to this file
fileVersionInfoFromUrl ( $url ) : stdClass Gets the versioned path to this $url path
imageCaptionPath ( $imagePath ) : string Get caption path from image path
isUrlPath ( $url ) : boolean Returns true or false depending on if this is an image url or not
makeRelativePath ( $path ) : string Make this path relative to public directory
touch ( $mediapath ) Create an empty file in this location
zencoderUrl ( $filename ) : string Returns the zencoder url for this filename

Method Details

__construct() public méthode

Create a new Media Path Helper the purpose of this class is to determine paths for media (and versions of media)
public __construct ( string $basepath = null, string $baseurl = null, null $Config = null )
$basepath string
$baseurl string
$Config null

basePath() public méthode

Gets the basepath for us
public basePath ( ) : string
Résultat string

downloadFromUrl() public méthode

Downloads the image so that we can re-use it later and crop it and resize it accordingly
public downloadFromUrl ( $path, $newFilePath = null ) : string
$path
Résultat string

fileExists() public méthode

Check to see if a file exists or not
public fileExists ( $mediapath ) : boolean
$mediapath
Résultat boolean

fileVersionInfo() public méthode

Gets the versioned path to this file
public fileVersionInfo ( $filePath ) : stdClass
$filePath
Résultat stdClass

fileVersionInfoFromUrl() public méthode

Gets the versioned path to this $url path
public fileVersionInfoFromUrl ( $url ) : stdClass
$url
Résultat stdClass

imageCaptionPath() public méthode

Get caption path from image path
public imageCaptionPath ( $imagePath ) : string
Résultat string

isUrlPath() public méthode

Returns true or false depending on if this is an image url or not
public isUrlPath ( $url ) : boolean
$url
Résultat boolean

makeRelativePath() public méthode

Make this path relative to public directory
public makeRelativePath ( $path ) : string
$path
Résultat string

touch() public méthode

Create an empty file in this location
public touch ( $mediapath )
$mediapath

zencoderUrl() public méthode

Returns the zencoder url for this filename
public zencoderUrl ( $filename ) : string
$filename
Résultat string