Class shardimage\shardimagephpapi\services\BaseService
Extendable service.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$customHeaderPrefix | string | Prefix for custom headers (e.g. X-Some-Header) | shardimage\shardimagephpapi\services\BaseService |
$host | string | Backend host | shardimage\shardimagephpapi\services\BaseService |
$preferredResource | string | Preferred resource handler for presenting resources | shardimage\shardimagephpapi\services\BaseService |
$resourceHandlers | array | Resource handlers (e.g. for files) | shardimage\shardimagephpapi\services\BaseService |
Public Methods
Protected Methods
Method | Description | Defined By |
---|---|---|
ensureClass() | Creates an object from the given parameters. | shardimage\shardimagephpapi\base\BaseObject |
init() | Custom initialization. | shardimage\shardimagephpapi\base\BaseObject |
Property Details
Prefix for custom headers (e.g. X-Some-Header)
Backend host
Preferred resource handler for presenting resources
public string $preferredResource = \shardimage\shardimagephpapi\base\resources\StreamResource::class
Resource handlers (e.g. for files)
public array $resourceHandlers = [\shardimage\shardimagephpapi\base\resources\StreamResource::class]
Method Details
Builds a custom header (e.g. X-Some-Header).
public string buildCustomHeader ( $header ) | ||
$header | string | Header |
Returns whether the provided value is file.
public boolean getResourceHandler ( $value ) | ||
$value | mixed | Value |
Logs an event.
public void log ( $level, $event ) | ||
$level | integer | PHP log level |
$event | string | Event string |
public void parseCustomHeader ( $header ) | ||
$header |