HttpSourceConfig

Extends \HttpSourceConfigFactoryItem

Http source endpoints config

package

HttpSource

subpackage

Config

Methods

Constructor

__construct(\HttpSourceConfigFactory $ConfigFactory) 
inherited

Arguments

$ConfigFactory

\HttpSourceConfigFactory

Config factory instance

Check if endpoint matched by given fields

_endpointMatch(\HttpSourceEndpoint $Endpoint, array $fields) : boolean

Arguments

$fields

array

Response

boolean

Add and check endpoint

add(\HttpSourceEndpoint $Endpoint) : \HttpSourceConfig
throws

If endpoint configuration is incorrect

Arguments

Response

\HttpSourceConfig

Set or get endpoint cache name

cacheName(string $name = null) : \HttpSourceEndpoint

Arguments

$name

string

Response

\HttpSourceEndpoint

Returns endpoint info for the model in schema format

describe(\Model $model) : array

Arguments

$model

\Model

Response

array

Get endpoint by id

endpoint(integer $id) : \HttpSourceEndpoint
throws

If endpoint not found

Arguments

$id

integer

Response

\HttpSourceEndpoint

Finds endpoint that match given arguments

findEndpoint(string $method, string $table, array $fields = array()) : \HttpSourceEndpoint
throws

If endpoint not found

Arguments

$method

string

CRUD method name

$table

string

$fields

array

Response

\HttpSourceEndpoint

Retunrn config factory

getConfigFactory() : \HttpSourceConfigFactory
inherited

Returns list of available sources (tables)

listSources() : array

Response

array

Get and set default endpoint mapped read params

readParams(array $params = null) : \HttpSourceConfig

Arguments

$params

array

Response

\HttpSourceConfig

Get and set default endpoint result handler

result(\HttpSourceResult $Result = null) : \HttpSourceConfig

Arguments

Response

\HttpSourceConfig

Properties

Holds default result handler that applied if no result handler found in endpoint

_result : \HttpSourceResult
var

Type(s)

\HttpSourceResult

Added endpoints

_endpoints : array
var

Type(s)

array

Added endpoints by id

_endpointsById : array
var

Type(s)

array

Default mapped read params (limit, offset, etc)

_readParams : array
var

Type(s)

array

Available endpoint methods

_methods : array
var

Type(s)

array

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

_cacheName : string

Cache works only for read method

var

Type(s)

string

Config factory instance

_ConfigFactory : \HttpSourceConfigFactory
inherited