StreamLoader implements Closure, Loader, SpanAttributes
FinalYes
Interfaces
- Closure
- Loaders implementing this adapter will be additionally notified by the pipeline about the last set of Rows processed by the pipeline.
- Loader
- SpanAttributes
Methods
- __construct() : mixed
- closure() : void
- describe() : null|Description
- fromDescription() : static
- load() : void
- output() : self
- spanAttributes() : array<string, bool|float|int|string>
- stderr() : self
- stdout() : self
Methods
__construct()
public
__construct(string $url[, Mode $mode = Mode::WRITE ][, bool|int $truncate = 20 ][, Output $output = Output::rows ][, Formatter $formatter = new AsciiTableFormatter() ][, SchemaFormatter $schemaFormatter = new ASCIISchemaFormatter() ][, Type $type = Type::custom ]) : mixed
Parameters
- $url : string
-
all protocols supported by PHP are allowed https://www.php.net/manual/en/wrappers.php
- $mode : Mode = Mode::WRITE
-
only writing modes explained in https://www.php.net/manual/en/function.fopen.php are supported
- $truncate : bool|int = 20
-
if false or 0, then columns in display are not truncated
- $output : Output = Output::rows
- $formatter : Formatter = new AsciiTableFormatter()
-
- if not passed AsciiTableFormatter is used
- $schemaFormatter : SchemaFormatter = new ASCIISchemaFormatter()
- $type : Type = Type::custom
closure()
public
closure() : void
describe()
public
describe() : null|Description
Return values
null|Description —null when this instance cannot cross a process boundary (a live client, a custom collaborator)
fromDescription()
public
static fromDescription(array<string|int, mixed> $data, Rebuild $rebuild) : static
Parameters
- $data : array<string|int, mixed>
- $rebuild : Rebuild
Return values
staticload()
public
load(Rows $rows, Backend $backend) : void
Parameters
output()
public
static output([int|bool $truncate = 20 ][, Output $output = Output::rows ][, Formatter $formatter = new AsciiTableFormatter() ][, SchemaFormatter $schemaFormatter = new ASCIISchemaFormatter() ]) : self
Parameters
- $truncate : int|bool = 20
- $output : Output = Output::rows
- $formatter : Formatter = new AsciiTableFormatter()
- $schemaFormatter : SchemaFormatter = new ASCIISchemaFormatter()
Return values
selfspanAttributes()
public
spanAttributes() : array<string, bool|float|int|string>
Return values
array<string, bool|float|int|string>stderr()
public
static stderr([int|bool $truncate = 20 ][, Output $output = Output::rows ][, Formatter $formatter = new AsciiTableFormatter() ][, SchemaFormatter $schemaFormatter = new ASCIISchemaFormatter() ]) : self
Parameters
- $truncate : int|bool = 20
- $output : Output = Output::rows
- $formatter : Formatter = new AsciiTableFormatter()
- $schemaFormatter : SchemaFormatter = new ASCIISchemaFormatter()
Return values
selfstdout()
public
static stdout([int|bool $truncate = 20 ][, Output $output = Output::rows ][, Formatter $formatter = new AsciiTableFormatter() ][, SchemaFormatter $schemaFormatter = new ASCIISchemaFormatter() ]) : self
Parameters
- $truncate : int|bool = 20
- $output : Output = Output::rows
- $formatter : Formatter = new AsciiTableFormatter()
- $schemaFormatter : SchemaFormatter = new ASCIISchemaFormatter()