DSL References
DSL stands for Domain Specific Language. In Flow, the DSL is a set of small functions that wrap object construction so pipelines read top-to-bottom. See the examples for usage in context.
EXTRACTOR
/**
* @param Path|string $path - string is internally turned into stream
* @param ?string $pointer - if you want to iterate only results of a subtree, use a pointer, read more at https://github.com/halaxa/json-machine#parsing-a-subtree - @deprecate use withPointer method instead
* @param null|Schema $schema - enforce schema on the extracted data - @deprecate use withSchema method instead
*/
from_json(Path|string $path, ?string $pointer, ?Schema $schema) : JsonExtractor /**
* Used to read from a JSON lines https://jsonlines.org/ formatted file.
*
* @param Path|string $path - string is internally turned into stream
*/
from_json_lines(Path|string $path) : JsonLinesExtractor LOADER
/**
* @param Path|string $path
* @param int $flags - PHP JSON Flags - @deprecate use withFlags method instead
* @param string $date_time_format - format for DateTimeInterface::format() - @deprecate use withDateTimeFormat method instead
* @param bool $put_rows_in_new_lines - if you want to put each row in a new line - @deprecate use withRowsInNewLines method instead
*
* @return JsonLoader
*/
to_json(Path|string $path, int $flags, string $date_time_format, bool $put_rows_in_new_lines) : JsonLoader /**
* Used to write to a JSON lines https://jsonlines.org/ formatted file.
*
* @param Path|string $path
*
* @return JsonLinesLoader
*/
to_json_lines(Path|string $path) : JsonLinesLoader