PHP Класс Devise\Media\MediaPaths

Показать файл Открыть проект

Открытые методы

Метод Описание
__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

Описание методов

__construct() публичный Метод

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() публичный Метод

Gets the basepath for us
public basePath ( ) : string
Результат string

downloadFromUrl() публичный Метод

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
Результат string

fileExists() публичный Метод

Check to see if a file exists or not
public fileExists ( $mediapath ) : boolean
$mediapath
Результат boolean

fileVersionInfo() публичный Метод

Gets the versioned path to this file
public fileVersionInfo ( $filePath ) : stdClass
$filePath
Результат stdClass

fileVersionInfoFromUrl() публичный Метод

Gets the versioned path to this $url path
public fileVersionInfoFromUrl ( $url ) : stdClass
$url
Результат stdClass

imageCaptionPath() публичный Метод

Get caption path from image path
public imageCaptionPath ( $imagePath ) : string
Результат string

isUrlPath() публичный Метод

Returns true or false depending on if this is an image url or not
public isUrlPath ( $url ) : boolean
$url
Результат boolean

makeRelativePath() публичный Метод

Make this path relative to public directory
public makeRelativePath ( $path ) : string
$path
Результат string

touch() публичный Метод

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

zencoderUrl() публичный Метод

Returns the zencoder url for this filename
public zencoderUrl ( $filename ) : string
$filename
Результат string