StreamLoader implements Closure, Loader
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
Methods
- __construct() : mixed
- closure() : void
- load() : void
- output() : self
- 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 FormatterAsciiTableFormatter() ][, 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 FormatterAsciiTableFormatter()
-
- if not passed AsciiTableFormatter is used
- $schemaFormatter : SchemaFormatter = new ASCIISchemaFormatter()
- $type : Type = Type::custom
closure()
public
closure(FlowContext $context) : void
Parameters
- $context : FlowContext
load()
public
load(Rows $rows, FlowContext $context) : void
Parameters
- $rows : Rows
- $context : FlowContext
output()
public
static output([int|bool $truncate = 20 ][, Output $output = Output::rows ][, Formatter $formatter = new FormatterAsciiTableFormatter() ][, SchemaFormatter $schemaFormatter = new ASCIISchemaFormatter() ]) : self
Parameters
- $truncate : int|bool = 20
- $output : Output = Output::rows
- $formatter : Formatter = new FormatterAsciiTableFormatter()
- $schemaFormatter : SchemaFormatter = new ASCIISchemaFormatter()
Return values
selfstderr()
public
static stderr([int|bool $truncate = 20 ][, Output $output = Output::rows ][, Formatter $formatter = new FormatterAsciiTableFormatter() ][, SchemaFormatter $schemaFormatter = new ASCIISchemaFormatter() ]) : self
Parameters
- $truncate : int|bool = 20
- $output : Output = Output::rows
- $formatter : Formatter = new FormatterAsciiTableFormatter()
- $schemaFormatter : SchemaFormatter = new ASCIISchemaFormatter()
Return values
selfstdout()
public
static stdout([int|bool $truncate = 20 ][, Output $output = Output::rows ][, Formatter $formatter = new FormatterAsciiTableFormatter() ][, SchemaFormatter $schemaFormatter = new ASCIISchemaFormatter() ]) : self
Parameters
- $truncate : int|bool = 20
- $output : Output = Output::rows
- $formatter : Formatter = new FormatterAsciiTableFormatter()
- $schemaFormatter : SchemaFormatter = new ASCIISchemaFormatter()