\League\CsvRFC4180Field

A stream filter to conform the CSV field to RFC4180.

DEPRECATION WARNING! This class will be removed in the next major point release

Summary

Methods
Properties
Constants
addTo()
addFormatterTo()
register()
getFiltername()
filter()
onCreate()
$filtername
$params
FILTERNAME
isValidParams()
isValidSequence()
$search
$replace
$force_enclosure
N/A
No private methods found
No private properties found
N/A

Constants

FILTERNAME

FILTERNAME = 'convert.league.csv.rfc4180'

Properties

$filtername

$filtername : string

the filter name used to instantiate the class with.

Type

string

$params

$params : mixed

Contents of the params parameter passed to stream_filter_append or stream_filter_prepend functions.

Type

mixed

$search

$search : array<mixed,string>

The value being search for.

Type

array<mixed,string>

$replace

$replace : array<mixed,string>

The replacement value that replace found $search values.

Type

array<mixed,string>

$force_enclosure

$force_enclosure : string

Characters that triggers enclosure with PHP fputcsv.

Type

string

Methods

addTo()

addTo(\League\Csv\AbstractCsv  $csv, \League\Csv\string  $whitespace_replace = '') 

Static method to add the stream filter to a {@link AbstractCsv} object.

Parameters

\League\Csv\AbstractCsv $csv
\League\Csv\string $whitespace_replace

addFormatterTo()

addFormatterTo(\League\Csv\Writer  $csv, \League\Csv\string  $whitespace_replace) 

Add a formatter to the {@link Writer} object to format the record field to avoid enclosure around a field with an empty space.

Parameters

\League\Csv\Writer $csv
\League\Csv\string $whitespace_replace

register()

register() 

Static method to register the class as a stream filter.

getFiltername()

getFiltername() 

Static method to return the stream filter filtername.

filter()

filter(  $in,   $out,   $consumed,   $closing) 

{@inheritdoc}

Parameters

$in
$out
$consumed
$closing

onCreate()

onCreate() 

{@inheritdoc}

isValidParams()

isValidParams(array  $params) 

Validate params property.

Parameters

array $params

isValidSequence()

isValidSequence(array  $params) : boolean

Is Valid White space replaced sequence.

Parameters

array $params

Returns

boolean