Flow PHP

functions.php

Functions

from_csv()

from_csv(Path|string $path[, bool $with_header = true ][, bool $empty_to_null = true ][, null|string $separator = null ][, null|string $enclosure = null ][, null|string $escape = null ][, int<1, max> $characters_read_in_line = 1000 ][, null|Schema $schema = null ]) : CSVExtractor
Parameters
$path : Path|string
$with_header : bool = true
  • @deprecated use $loader->withHeader() instead
$empty_to_null : bool = true
  • @deprecated use $loader->withEmptyToNull() instead
$separator : null|string = null
  • @deprecated use $loader->withSeparator() instead
$enclosure : null|string = null
  • @deprecated use $loader->withEnclosure() instead
$escape : null|string = null
  • @deprecated use $loader->withEscape() instead
$characters_read_in_line : int<1, max> = 1000
  • @deprecated use $loader->withCharactersReadInLine() instead
$schema : null|Schema = null
  • @deprecated use $loader->withSchema() instead
Return values
CSVExtractor

to_csv()

to_csv(Path|string $uri[, bool $with_header = true ][, string $separator = ',' ][, string $enclosure = '"' ][, string $escape = '\' ][, string $new_line_separator = PHP_EOL ][, string $datetime_format = DateTimeInterface::ATOM ]) : CSVLoader
Parameters
$uri : Path|string
$with_header : bool = true
  • @deprecated use $loader->withHeader() instead
$separator : string = ','
  • @deprecated use $loader->withSeparator() instead
$enclosure : string = '"'
  • @deprecated use $loader->withEnclosure() instead
$escape : string = '\'
  • @deprecated use $loader->withEscape() instead
$new_line_separator : string = PHP_EOL
  • @deprecated use $loader->withNewLineSeparator() instead
$datetime_format : string = DateTimeInterface::ATOM
  • @deprecated use $loader->withDateTimeFormat() instead
Return values
CSVLoader

csv_detect_separator()

csv_detect_separator(SourceStream $stream[, int<1, max> $lines = 5 ][, null|Option $fallback = new Option(',', '"', '\') ][, null|Options $options = null ]) : Option
Parameters
$stream : SourceStream
  • valid resource to CSV file
$lines : int<1, max> = 5
  • number of lines to read from CSV file, default 5, more lines means more accurate detection but slower detection
$fallback : null|Option = new Option(',', '"', '\')
  • fallback option to use when no best option can be detected, default is Option(',', '"', '\')
$options : null|Options = null
  • options to use for detection, default is Options::all()
Return values
Option

        
On this page

Search results