Documentation

ServiceTrait

Description of ServiceTrait

Tags
author

zozlak

Table of Contents

Properties

$loadParamFromMeta  : bool
$param  : array<string|int, mixed>
Parameters list

Methods

getFormats()  : array<string|int, Format>
Returns all return formats provided by the dissemination service.
getLocation()  : string
Gets disseminations service's URL (before parameters subsitution)
getMatchingResources()  : Generator
Returns repository resources which can be disseminated by a given service
getMatchQuery()  : QueryPart
Returns an SQL query matching dissemination services and resources (in any direction).
getParameters()  : array<string|int, mixed>
Get the parameters
getRequest()  : Request
Returns PSR-7 HTTP request disseminating a given resource.
getRevProxy()  : bool
Should the dissemination service request be reverse-proxied?
loadParametersFromMetadata()  : void
Tells the service it can load information on service parameters from its metadata.
getParameterClass()  : string
getParameterValues()  : array<string, mixed>
Evaluates parameter values for a given resource.
getResNmspId()  : string
Fetches a resource id in a given namespace.
getUrlParameters()  : array<string|int, string>
Returns list of all parameters of a given dissemination service
loadParameters()  : void

Properties

$loadParamFromMeta

private bool $loadParamFromMeta = false

$param

Parameters list

private array<string|int, mixed> $param

Methods

getFormats()

Returns all return formats provided by the dissemination service.

public getFormats() : array<string|int, Format>

Technically return formats are nothing more then strings. There is no requirement forcing them to be mime types, etc.

Return values
array<string|int, Format>

getLocation()

Gets disseminations service's URL (before parameters subsitution)

public getLocation() : string
Return values
string

getMatchingResources()

Returns repository resources which can be disseminated by a given service

public getMatchingResources([int|null $limit = null ][, int|null $offset = null ]) : Generator
Parameters
$limit : int|null = null
$offset : int|null = null
Return values
Generator

getMatchQuery()

Returns an SQL query matching dissemination services and resources (in any direction).

public static getMatchQuery(int $id, int $mode, Schema $schema) : QueryPart
Parameters
$id : int

resource or dissemination service id

$mode : int

one of:

  • ServiceInterface::QUERY_RES for querying resources for a given dissemination service
  • ServiceInterface::QUERY_DISSERV for querying dissemination services for a given resource
$schema : Schema

schema object providing RDF property mappings

Return values
QueryPart

getParameters()

Get the parameters

public getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRevProxy()

Should the dissemination service request be reverse-proxied?

public getRevProxy() : bool

If it's not set in the metadata, false is assumed.

Return values
bool

loadParametersFromMetadata()

Tells the service it can load information on service parameters from its metadata.

public loadParametersFromMetadata() : void

Information will be loaded in a lazy way (when it's needed).

getParameterClass()

private abstract getParameterClass() : string
Return values
string

getParameterValues()

Evaluates parameter values for a given resource.

private getParameterValues(array<string|int, string> $param, RepoResourceInterface $res) : array<string, mixed>
Parameters
$param : array<string|int, string>

list of parameters

$res : RepoResourceInterface

repository resource to be disseminated

Tags
throws
RuntimeException
Return values
array<string, mixed>

associative array with parameter values

getUrlParameters()

Returns list of all parameters of a given dissemination service

private getUrlParameters() : array<string|int, string>
Return values
array<string|int, string>

        
On this page

Search results