PHP Class Craft\Minimee_RemoteAssetModel

Inheritance: extends Minimee_BaseAssetModel
Afficher le fichier Open project: johndwells/craft.minimee

Protected Properties

Свойство Type Description
$_client

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
_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

Method Details

__construct() public méthode

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

_getInstanceOfClient() protected méthode

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

_sendClientRequest() protected méthode

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

exists() public méthode

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

getContents() public méthode

Get the contents of the remote asset.
public getContents ( ) : String
Résultat String

getFilenameUrlWithProtocol() public méthode

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
Résultat String

getLastTimeModified() public méthode

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

setAttribute() public méthode

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

Property Details

$_client protected_oe property

protected $_client