Class \avadim\FastExcelReader\Csv\CsvOptions

Source: 4.5.0 · dd0d48d

On this page


__construct()


php
public function __construct(array $options = [])

CsvOptions constructor

Parameters

  • array $options

__get()


php
public function __get($name): mixed|null

Magic getter for options

Parameters

  • string $name

__isset()


php
public function __isset($name): bool

Magic isset for options

Parameters

  • string $name

__set()


php
public function __set($name, $value): void

Magic setter for options

Parameters

  • string $name
  • mixed $value

create()


php
public static function create(array $options = []): CsvOptions

Create CsvOptions instance

Parameters

  • array $options

setAllowBinary()


php
public function setAllowBinary(bool $enable): CsvOptions

Allow binary input instead of rejecting it

By default the reader throws when the file looks binary (a NUL byte, or ahigh share of control characters). Set this to skip that guard, e.g. toforce-parse an unusual text file.

Parameters

  • bool $enable

setCommentPrefix()


php
public function setCommentPrefix(?string $value): CsvOptions

Set comment prefix

Parameters

  • string|null $value

setDelimiter()


php
public function setDelimiter(?string $delimiter): CsvOptions

Set column delimiter character (null for auto-detect)

Parameters

  • string|null $delimiter

setDoubleQuotes()


php
public function setDoubleQuotes(bool $enable): CsvOptions

Set whether to handle double quotes

Parameters

  • bool $enable

setEnclosure()


php
public function setEnclosure(string $enclosure): CsvOptions

Set enclosure character of fields

Parameters

  • string $enclosure

setEncoding()


php
public function setEncoding(string $encoding): CsvOptions

Set input file encoding (null = auto)

Parameters

  • string $encoding

setEscape()


php
public function setEscape(string $escape): CsvOptions

Set escape character, usually '' or '' ('' or null for no escape)

Parameters

  • string $escape

setMode()


php
public function setMode(string $mode): CsvOptions

Set parsing mode (strict or tolerant)

Parameters

  • string $mode

setSkipEmptyLines()


php
public function setSkipEmptyLines(bool $enable): CsvOptions

Set whether to skip empty lines

Parameters

  • bool $enable

setStreamFilter()


php
public function setStreamFilter(?string $filter): CsvOptions

Set stream filter

Parameters

  • string|null $filter

setTrimFields()


php
public function setTrimFields(bool $enable): CsvOptions

Set whether to trim fields (does not affect spaces inside quotes)

Parameters

  • bool $enable

toArray()


php
public function toArray(): array

Return all options as array

Parameters

None


FastExcelReader 4.5.0 · Search this library and version.

Loading search…

Could not load search. Please try again.

No results. Try another word or method name.