PHP Класс Craft\Minimee_RemoteAssetModel

Наследование: extends Minimee_BaseAssetModel
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_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