PHP 클래스 Craft\Minimee_RemoteAssetModel

상속: extends Minimee_BaseAssetModel
파일 보기 프로젝트 열기: johndwells/craft.minimee

보호된 프로퍼티들

프로퍼티 타입 설명
$_client

공개 메소드들

메소드 설명
__construct ( $attributes = [], ClientInterface $client = null )
exists ( ) : Bool Always will return true, since it is too expensive to fetch a remote file
getContents ( ) : String Get the contents of the remote asset.
getFilenameUrlWithProtocol ( ) : String Returns the filename URL with a valid protocol
getLastTimeModified ( ) : craft\DateTime Return a very old DateTime, since it is too expensive to fetch a remote file's headers
setAttribute ( String $name, Mixed $value ) Attribute mutators

보호된 메소드들

메소드 설명
_getInstanceOfClient ( ) Either create a fresh instance of Guzzle\Http\Client, or pass the instance we were given during instantiation.
_sendClientRequest ( ) Prepare & return response from sending a client request

메소드 상세

__construct() 공개 메소드

public __construct ( $attributes = [], ClientInterface $client = null )
$client ClientInterface

_getInstanceOfClient() 보호된 메소드

Either create a fresh instance of Guzzle\Http\Client, or pass the instance we were given during instantiation.
protected _getInstanceOfClient ( )

_sendClientRequest() 보호된 메소드

Prepare & return response from sending a client request
protected _sendClientRequest ( )

exists() 공개 메소드

Always will return true, since it is too expensive to fetch a remote file
public exists ( ) : Bool
리턴 Bool

getContents() 공개 메소드

Get the contents of the remote asset.
public getContents ( ) : String
리턴 String

getFilenameUrlWithProtocol() 공개 메소드

cURL can't (yet?) handle protocol relative URLs, so we match the session and use a secure or unsecure protocol to fetch the remote URLs contents.
public getFilenameUrlWithProtocol ( ) : String
리턴 String

getLastTimeModified() 공개 메소드

Return a very old DateTime, since it is too expensive to fetch a remote file's headers
public getLastTimeModified ( ) : craft\DateTime
리턴 craft\DateTime

setAttribute() 공개 메소드

Attribute mutators
public setAttribute ( String $name, Mixed $value )
$name String
$value Mixed

프로퍼티 상세

$_client 보호되어 있는 프로퍼티

protected $_client