PHP 클래스 lithium\data\source\Http

상속: extends lithium\data\Source
파일 보기 프로젝트 열기: unionofrad/lithium 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$connection Service connection

보호된 프로퍼티들

프로퍼티 타입 설명
$_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