PHP Класс lithium\data\source\Http

Наследование: extends lithium\data\Source
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$connection Service connection

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

Свойство Тип Описание
$_autoConfig array The set of array keys which will be auto-populated in the object's protected properties from constructor parameters.
$_classes array Fully-namespaced class references
$_isConnected boolean Is Connected?
$_methods array List of methods and their corresponding HTTP method and path.

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

Метод Описание
__call ( string $method, array $params ) : mixed Pass methods to service connection. Path and method are determined from Http::$_method. If not set, a GET request with the $method as the path will be used.
__construct ( array $config = [] ) : void Constructor.
__get ( string $property ) : mixed Pass properties to service connection
connect ( ) : boolean Fake the connection since service is called for every method.
create ( object $query, array $options = [] ) : mixed Create function used to POST.
delete ( object $query, array $options = [] ) : string Used by model to DELETE.
describe ( string $entity, array $fields = [], array $meta = [] ) : array Describe data source.
disconnect ( ) : boolean Disconnect from socket.
read ( object $query, array $options = [] ) : string Read used by model to GET.
relationship ( string $class, string $type, string $name, array $options = [] ) : array Defines or modifies the default settings of a relationship between two models.
respondsTo ( string $method, boolean $internal = false ) : boolean Determines if a given method can be called.
send ( array $query = null, array $options = [] ) : mixed Method to send to a specific resource.
sources ( object $class = null ) : array Returns available data sources (typically a list of REST resources collections).
update ( object $query, array $options = [] ) : string Update used by model to PUT.

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

Метод Описание
_init ( )

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

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

Pass methods to service connection. Path and method are determined from Http::$_method. If not set, a GET request with the $method as the path will be used.
См. также: lithium\data\source\Http::$_method
public __call ( string $method, array $params ) : mixed
$method string
$params array
Результат mixed

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

Constructor.
public __construct ( array $config = [] ) : void
$config array
Результат void

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

Pass properties to service connection
public __get ( string $property ) : mixed
$property string
Результат mixed

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

protected _init ( )

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

Fake the connection since service is called for every method.
public connect ( ) : boolean
Результат boolean

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

Create function used to POST.
public create ( object $query, array $options = [] ) : mixed
$query object
$options array
Результат mixed

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

Used by model to DELETE.
public delete ( object $query, array $options = [] ) : string
$query object
$options array
Результат string

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

Describe data source.
public describe ( string $entity, array $fields = [], array $meta = [] ) : array
$entity string
$fields array
$meta array
Результат array - returns an empty array

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

Disconnect from socket.
public disconnect ( ) : boolean
Результат boolean

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

Read used by model to GET.
public read ( object $query, array $options = [] ) : string
$query object
$options array
Результат string

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

Defines or modifies the default settings of a relationship between two models.
public relationship ( string $class, string $type, string $name, array $options = [] ) : array
$class string
$type string
$name string
$options array
Результат array Returns an array containing the configuration for a model relationship.

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

Determines if a given method can be called.
public respondsTo ( string $method, boolean $internal = false ) : boolean
$method string Name of the method.
$internal boolean Provide `true` to perform check from inside the class/object. When `false` checks also for public visibility; defaults to `false`.
Результат boolean Returns `true` if the method can be called, `false` otherwise.

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

Method to send to a specific resource.
public send ( array $query = null, array $options = [] ) : mixed
$query array a query object
$options array array.
Результат mixed

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

Returns available data sources (typically a list of REST resources collections).
public sources ( object $class = null ) : array
$class object
Результат array

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

Update used by model to PUT.
public update ( object $query, array $options = [] ) : string
$query object
$options array
Результат string

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

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

The set of array keys which will be auto-populated in the object's protected properties from constructor parameters.
protected array $_autoConfig
Результат array

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

Fully-namespaced class references
protected array $_classes
Результат array

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

Is Connected?
protected bool $_isConnected
Результат boolean

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

List of methods and their corresponding HTTP method and path.
protected array $_methods
Результат array

$connection публичное свойство

Service connection
public $connection