PHP Класс Snorlax\RestResource

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

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

Свойство Тип Описание
$client RestClient
$last_response mixed

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

Метод Описание
__call ( string $method, array $args ) : StdClass Calls the method contained in the actions of this resource
__construct ( RestClient $client ) Initializes the client
getActions ( ) : array Returns the actions available for this resource
getBaseUri ( ) : string Returns the base URI for every request
getLastResponse ( ) : mixed Returns the last_response of the last executed request

Защищенные методы

Метод Описание
parse ( string $response ) : string Returns the response parsed, by default as a json-decoded StdObject

Приватные методы

Метод Описание
getParams ( array $args ) : array Extracts the params from the arguments passed
getPath ( array $action, array $args ) : mixed Returns the URI path for the request

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

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

Calls the method contained in the actions of this resource
public __call ( string $method, array $args ) : StdClass
$method string
$args array
Результат StdClass The JSON decoded response

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

Initializes the client
public __construct ( RestClient $client )
$client RestClient

getActions() абстрактный публичный Метод

Returns the actions available for this resource
abstract public getActions ( ) : array
Результат array

getBaseUri() абстрактный публичный Метод

Returns the base URI for every request
abstract public getBaseUri ( ) : string
Результат string

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

Returns the last_response of the last executed request
public getLastResponse ( ) : mixed
Результат mixed

parse() защищенный Метод

Returns the response parsed, by default as a json-decoded StdObject
protected parse ( string $response ) : string
$response string
Результат string

Описание свойств

$client защищенное свойство

protected RestClient,snorlax $client
Результат RestClient

$last_response защищенное свойство

protected mixed $last_response
Результат mixed