Class shardimage\shardimagephpapi\services\BaseService

Inheritanceshardimage\shardimagephpapi\services\BaseService » shardimage\shardimagephpapi\base\BaseObject
Subclassesshardimage\shardimagephp\auth\ClientService, shardimage\shardimagephpapi\services\Client, shardimage\shardimagephpapi\services\Server

Extendable service.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined 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

Hide inherited methods

MethodDescriptionDefined By
__construct() Creates the object, populates the properties and calls the "init" method. shardimage\shardimagephpapi\base\BaseObject
__get() Returns the value of a non-defined property, it there is a getter method. shardimage\shardimagephpapi\base\BaseObject
__isset() Does the non-defined property with a getter exist and is it not NULL? shardimage\shardimagephpapi\base\BaseObject
__set() Sets the value of a non-defined property, if there is a setter method. shardimage\shardimagephpapi\base\BaseObject
__unset() Sets the value of a non-defined property to NULL, if there is a setter. shardimage\shardimagephpapi\base\BaseObject
buildCustomHeader() Builds a custom header (e.g. X-Some-Header). shardimage\shardimagephpapi\services\BaseService
getResourceHandler() Returns whether the provided value is file. shardimage\shardimagephpapi\services\BaseService
log() Logs an event. shardimage\shardimagephpapi\services\BaseService
parseCustomHeader() shardimage\shardimagephpapi\services\BaseService
toArray() Converts the object an array. shardimage\shardimagephpapi\base\BaseObject

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
ensureClass() Creates an object from the given parameters. shardimage\shardimagephpapi\base\BaseObject
init() Custom initialization. shardimage\shardimagephpapi\base\BaseObject

Property Details

$customHeaderPrefix public property

Prefix for custom headers (e.g. X-Some-Header)

$host public property

Backend host

public string $host null
$preferredResource public property

Preferred resource handler for presenting resources

public string $preferredResource = \shardimage\shardimagephpapi\base\resources\StreamResource::class
$resourceHandlers public property

Resource handlers (e.g. for files)

public array $resourceHandlers = [\shardimage\shardimagephpapi\base\resources\StreamResource::class]

Method Details

buildCustomHeader() public method

Builds a custom header (e.g. X-Some-Header).

public string buildCustomHeader ( $header )
$header string

Header

getResourceHandler() public method

Returns whether the provided value is file.

public boolean getResourceHandler ( $value )
$value mixed

Value

log() public method

Logs an event.

public void log ( $level, $event )
$level integer

PHP log level

$event string

Event string

parseCustomHeader() public method

public void parseCustomHeader ( $header )
$header