HttpSourceEndpointiAmExistsANDValid

Extends \HttpSourceEndpoint

HttpSourceEndpointiAmExistsANDValid

package

HttpSourceTest

subpackage

Config

Methods

Constructor

__construct(\HttpSourceConfigFactory $ConfigFactory) 
inherited

Arguments

$ConfigFactory

\HttpSourceConfigFactory

Config factory instance

Buils query parameters

_buildQuery(\Model $model, array $usedConditions, array $queryData) 
inherited

Arguments

$model

\Model

$usedConditions

array

List of conditions that must present in query

$queryData

array

Query data: conditions, limit, etc

If true conditions by default will be sent in query, otherwize in body

_mustSendInQuery(\Model $model) : boolean
inherited

Arguments

$model

\Model

Response

boolean

Apply renaming and callbacks to items

_process(array $items, array $storage, \Model $model) : array
inherited

Arguments

$items

array

$storage

array

$model

\Model

Response

array

Process conditions mappings as set by condition->map() method

_processConditions(\Model $model, array &$conditions) 
inherited

Arguments

$model

\Model

$conditions

array

Process read parameters. Eq: map limit parameter to some condition

_processReadParams(\Model $model, array &$params) 
inherited

Arguments

$model

\Model

$params

array

Add new conditions

addCondition(\HttpSourceCondition $Condition) : \HttpSourceEndpoint
inherited

Arguments

Response

\HttpSourceEndpoint

Add new field

addField(\HttpSourceField $Field) : \HttpSourceEndpoint
inherited

Arguments

Response

\HttpSourceEndpoint

Build request and store it in model->request

buildRequest(\Model $model, array $queryData) 
inherited

Arguments

$model

\Model

$queryData

array

Set or get endpoint cache name

cacheName(string $name = null) : \HttpSourceEndpoint
inherited

Arguments

$name

string

Response

\HttpSourceEndpoint

Get condition by name, if condition not exists create, add and return new

condition(string $name) : \HttpSourceCondition
inherited

Arguments

$name

string

Response

\HttpSourceCondition

Returns associative list of default condition names and values

conditionsDefaults() : array
inherited

Response

array

Get field by name, if field not exists create, add and return new

field(string $name) : \HttpSourceCondition
inherited

Arguments

$name

string

Response

\HttpSourceCondition

Retunrn config factory

getConfigFactory() : \HttpSourceConfigFactory
inherited

Set or get endpoint id

id(integer $id = null) : \HttpSourceEndpoint
inherited
deprecated

Arguments

$id

integer

Response

\HttpSourceEndpoint

Get endpoint method

method() : \HttpSourceEndpoint
inherited

Set endpoint method to 'check'

methodCheck() : \HttpSourceEndpoint
inherited

Set endpoint method to 'create'

methodCreate() : \HttpSourceEndpoint
inherited

Set endpoint method to 'delete'

methodDelete() : \HttpSourceEndpoint
inherited

Set endpoint method to 'read'

methodRead() : \HttpSourceEndpoint
inherited

Set endpoint method to 'update'

methodUpdate() : \HttpSourceEndpoint
inherited

Returns list of optional condition names

optionalConditions() : array
inherited

Response

array

Set or get endpoint path

path(string $name = null) : \HttpSourceEndpoint
inherited

Arguments

$name

string

Response

\HttpSourceEndpoint

Process field mappings as set by field->map() method

processFields(\Model $model, array &$results) 
inherited

Arguments

$model

\Model

$results

array

Process results with result handler

processResult(\Model $model, array &$result) 
inherited

Arguments

$model

\Model

$result

array

Set or get endpoint query builder instead of _buildQuery

queryBuilder(callable $queryBuilder = null) : \HttpSourceEndpoint
inherited

Arguments

$queryBuilder

callable

Response

\HttpSourceEndpoint

Set or get endpoint mapped read param

readParams(array $params = null) : \HttpSourceEndpoint
inherited

Arguments

$params

array

Response

\HttpSourceEndpoint

Set or get endpoint request splitter

requestSplitter(callable $requestSplitter = null) : \HttpSourceEndpoint
inherited

Arguments

$requestSplitter

callable

Response

\HttpSourceEndpoint

Returns list of required condition names

requiredConditions() : array
inherited

Response

array

Set or get endpoint response joiner

responseJoiner(callable $responseJoiner = null) : \HttpSourceEndpoint
inherited

Arguments

$responseJoiner

callable

Response

\HttpSourceEndpoint

Set or get endpoint result handler

result(\HttpSourceResult $Result = null) : \HttpSourceEndpoint
inherited

Arguments

Response

\HttpSourceEndpoint

Build schema array to describe endpoint

schema() : array
inherited

Response

array

Set or get endpoint table

table(string $name = null) : \HttpSourceEndpoint
inherited

Arguments

$name

string

Response

\HttpSourceEndpoint

Constants

CRUD constants

METHOD_READ
inherited

METHOD_CREATE

METHOD_CREATE
inherited

METHOD_UPDATE

METHOD_UPDATE
inherited

METHOD_DELETE

METHOD_DELETE
inherited

METHOD_CHECK

METHOD_CHECK
inherited

Properties

Endpoint CRUD method

_method : string
inherited
var

Type(s)

string

Table name

_table : string
inherited
var

Type(s)

string

Endpoint path

_path : string
inherited
var

Type(s)

string

Endpoint fields

_fields : array
inherited
var

Type(s)

array

Endpoint conditions

_conditions : array
inherited
var

Type(s)

array

Endpoint result handler

_result : \HttpSourceResult
inherited
var

Type(s)

\HttpSourceResult

Mapped read params (limit, offset, etc)

_readParams : array
inherited
var

Type(s)

array

Endpoint id

_id : integer
inherited
var

Type(s)

integer

Function for splitting request

_requestSplitter : callable
inherited
var

Type(s)

callable

Function to join results of splitted requests

_responseJoiner : callable
inherited
var

Type(s)

callable

Function to build query instead of _buildQuery

_queryBuilder : callable
inherited
var

Type(s)

callable

Cache name for store requests. If null cache not used.

_cacheName : string
inherited

Cache works only for read method This setting will override global cache from config

var

Type(s)

string

Config factory instance

_ConfigFactory : \HttpSourceConfigFactory
inherited