Flow PHP

functions.php

Functions

from_json()

from_json(Path|string $path[, string|null $pointer = null ][, Schema|null $schema = null ]) : JsonExtractor
Parameters
$path : Path|string
  • string is internally turned into stream
$pointer : string|null = null
  • 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
$schema : Schema|null = null
  • enforce schema on the extracted data - @deprecate use withSchema method instead
Return values
JsonExtractor

from_json_lines()

Used to read from a JSON lines https://jsonlines.org/ formatted file.

from_json_lines(Path|string $path) : JsonLinesExtractor
Parameters
$path : Path|string
  • string is internally turned into stream
Return values
JsonLinesExtractor

to_json()

to_json(Path|string $path[, int $flags = JSON_THROW_ON_ERROR ][, string $date_time_format = DateTimeInterface::ATOM ][, bool $put_rows_in_new_lines = false ]) : JsonLoader
Parameters
$path : Path|string
$flags : int = JSON_THROW_ON_ERROR
  • PHP JSON Flags - @deprecate use withFlags method instead
$date_time_format : string = DateTimeInterface::ATOM
  • format for DateTimeInterface::format() - @deprecate use withDateTimeFormat method instead
$put_rows_in_new_lines : bool = false
  • if you want to put each row in a new line - @deprecate use withRowsInNewLines method instead
Return values
JsonLoader

to_json_lines()

Used to write to a JSON lines https://jsonlines.org/ formatted file.

to_json_lines(Path|string $path) : JsonLinesLoader
Parameters
$path : Path|string
Return values
JsonLinesLoader

        
On this page

Search results