class CsvWriter (View source)

A Writer class for Express Entry objects

Properties

protected Writer $writer
protected Date $dateFormatter

Methods

__construct(Writer $writer, Date $dateFormatter)

No description

insertHeaders(Entity $entity)

No description

insertEntryList(EntryList $list)

Insert all data from the passed EntryList

projectList(EntryList $list)

A generator that takes an EntryList and converts it to CSV rows

array
projectEntry(Entry $entry)

Turn an Entry into an array

getHeaders(Entity $entity)

A generator that returns all headers

Details

__construct(Writer $writer, Date $dateFormatter)

No description

Parameters

Writer $writer
Date $dateFormatter

insertHeaders(Entity $entity)

No description

Parameters

Entity $entity

insertEntryList(EntryList $list)

Insert all data from the passed EntryList

Parameters

EntryList $list

private Generator projectList(EntryList $list)

A generator that takes an EntryList and converts it to CSV rows

Parameters

EntryList $list

Return Value

Generator

private array projectEntry(Entry $entry)

Turn an Entry into an array

Parameters

Entry $entry

Return Value

array

private Generator getHeaders(Entity $entity)

A generator that returns all headers

Parameters

Entity $entity

Return Value

Generator