Documentation

Service
in package

Wrapper handling boilerplate code around the ARCHE microservice initialization

See the tests/config.yaml for the required config file structure.

Tags
author

zozlak

Table of Contents

Properties

$cacheDb  : CachePdo
$clbck  : callable
$config  : object
$log  : Log

Methods

__construct()  : mixed
getConfig()  : object
getLog()  : Log
getNoCache()  : bool
Provides a standardized way to determine if the cache should be invalidated
processException()  : ResponseCacheItem
serveRequest()  : ResponseCacheItem
setCacheDb()  : void
setCallback()  : void
setCacheControlHeader()  : void

Properties

Methods

__construct()

public __construct(string $confFile) : mixed
Parameters
$confFile : string

getConfig()

public getConfig() : object
Return values
object

getLog()

public getLog() : Log
Return values
Log

getNoCache()

Provides a standardized way to determine if the cache should be invalidated

public static getNoCache([bool $httpCacheControl = true ][, string $noCacheQueryParam = 'noCache' ]) : bool
Parameters
$httpCacheControl : bool = true
$noCacheQueryParam : string = 'noCache'
Return values
bool

serveRequest()

public serveRequest(string $id, array<string|int, mixed> $param[, bool|null $noCache = null ]) : ResponseCacheItem
Parameters
$id : string
$param : array<string|int, mixed>
$noCache : bool|null = null
Return values
ResponseCacheItem

setCallback()

public setCallback(callable $clbck) : void
Parameters
$clbck : callable

response cache miss handler with signature fn(acdhOeaw\arche\lib\RepoResourceInterface $res, array $param) where the $param will passed from the serveRequest() method $param parameter.


        
On this page

Search results