Documentation

PsrResponseCommand extends AbstractCommand
in package

Table of Contents

Properties

$arguments  : array<string|int, mixed>
Arguments of command
$output  : mixed
Output of command

Methods

__construct()  : mixed
Creates new command instance
argument()  : Argument
Creates new argument instance from given argument key
execute()  : bool
Builds PSR7 compatible response. May replace "response" command in some future.
getOutput()  : mixed
Returns output data of current command
hasOutput()  : bool
Determines if current instance has output data
setOutput()  : mixed
Sets output data of current command

Properties

$arguments

Arguments of command

public array<string|int, mixed> $arguments

Methods

__construct()

Creates new command instance

public __construct(array<string|int, mixed> $arguments) : mixed
Parameters
$arguments : array<string|int, mixed>

execute()

Builds PSR7 compatible response. May replace "response" command in some future.

public execute(Image $image) : bool

Method will generate binary stream and put it inside PSR-7 ResponseInterface. Following code can be optimized using native php streams and more "clean" streaming, however drivers has to be updated first.

Parameters
$image : Image
Return values
bool

getOutput()

Returns output data of current command

public getOutput() : mixed

hasOutput()

Determines if current instance has output data

public hasOutput() : bool
Return values
bool

setOutput()

Sets output data of current command

public setOutput(mixed $value) : mixed
Parameters
$value : mixed

        
On this page

Search results