PHP 클래스 Devise\Media\MediaPaths

파일 보기 프로젝트 열기: devisephp/cms

공개 메소드들

메소드 설명
__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