ApiOpenStudio PHPDoc

OutputRemote extends OutputEntity
in package

Class OutputRemote

Remote outputs base class.

Table of Contents

$id  : mixed
Processor ID.
$data  : DataContainer
The output data.
$details  : array<string|int, mixed>
{@inheritDoc}
$logger  : MonologWrapper
Logger object.
$meta  : array<string|int, mixed>
Metadata for the processor.
$request  : Request
All the request details.
$transport  : mixed
__construct()  : mixed
details()  : array<string|int, mixed>
Return details for processor.
process()  : mixed
Main processor function.
val()  : mixed|DataContainer
Process a variable into a final result for the processor.
castData()  : mixed
Cast the data to the required Type.
isDataContainer()  : bool
Validate if a set of data is wrapped in a DataContainer object.
validateAllowedTypes()  : void
Validate an input for allowed variable types
validateAllowedValues()  : void
Validate an input for allowed values.

Properties

$id

Processor ID.

public mixed $id = ''

Processor ID.

$details

{@inheritDoc}

protected array<string|int, mixed> $details = ['name' => 'Base remote', 'machineName' => 'base_remote', 'description' => 'Base class to output in the results of the resource to a remote server.', 'menu' => '', 'input' => ['filename' => ['description' => 'The output filename.', 'cardinality' => [0, 1], 'literalAllowed' => true, 'limitProcessors' => [], 'limitTypes' => ['text'], 'limitValues' => [], 'default' => ''], 'transport' => ['description' => 'The Transport for uploading. example: s3, sftp, google_cloud, azure_blob.', 'cardinality' => [1, 1], 'literalAllowed' => true, 'limitProcessors' => [], 'limitTypes' => ['text'], 'limitValues' => [], 'default' => ''], 'parameters' => [ // phpcs:ignore 'description' => 'Name/Value pairs for parameters required by the transport, e.g. username, password, etc.', 'cardinality' => [0, '*'], 'literalAllowed' => true, 'limitProcessors' => [], 'limitTypes' => [], 'limitValues' => [], 'default' => [], ]]]

Details of the processor.

$meta

Metadata for the processor.

protected array<string|int, mixed> $meta

$request

All the request details.

protected Request $request

Request.

Methods

__construct()

public __construct(array<string|int, mixed> &$meta, Request &$request[, MonologWrapper|null $logger = null ]) : mixed
Parameters
$meta : array<string|int, mixed>

Metadata for the processor.

$request : Request

The full request object.

$logger : MonologWrapper|null = null

The logger.

Return values
mixed

details()

Return details for processor.

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

process()

Main processor function.

public process() : mixed
Tags
throws
ApiException
Return values
mixed

Result of the processor.

val()

Process a variable into a final result for the processor.

public val(string $key[, bool|null $rawData = false ]) : mixed|DataContainer

This method can be used to process a value in its meta to return a final result that it can use. If the object is a processor, then it will process that down to a final return value, or if the obj is a simple value, then it will return that. Anything else will return an error object.

Setting $realValue to true will force the value to be the actual value, rather than a potential dataContainer.

Parameters
$key : string

The key for the input variable in the meta.

$rawData : bool|null = false

Return the raw data or a DataContainer.

Tags
throws
ApiException

Invalid key or data.

Return values
mixed|DataContainer

castData()

Cast the data to the required Type.

protected abstract castData() : mixed
Tags
throws
ApiException

Throw an exception if unable to convert the data.

Return values
mixed

isDataContainer()

Validate if a set of data is wrapped in a DataContainer object.

protected isDataContainer(mixed $data) : bool
Parameters
$data : mixed

DataContainer or raw data.

Return values
bool

validateAllowedTypes()

Validate an input for allowed variable types

private validateAllowedTypes(string $type, array<string|int, mixed> $limitTypes, int $min, string $key) : void
Parameters
$type : string

Input value type.

$limitTypes : array<string|int, mixed>

List of limit on variable types.

$min : int

Minimum number of values.

$key : string

The key of the input being validated.

Tags
throws
ApiException

Invalid data type.

Return values
void

validateAllowedValues()

Validate an input for allowed values.

private validateAllowedValues(mixed $val, array<string|int, mixed> $limitValues, int $min, string $key) : void
Parameters
$val : mixed

Input value.

$limitValues : array<string|int, mixed>

List of allowed values.

$min : int

Minimum number of values.

$key : string

The key of the input being validated.

Tags
throws
ApiException

Invalid value.

Return values
void

Search results