CsvWriter
class CsvWriter extends AbstractStreamWriter
Class CsvWriter
Properties
| protected | $tmpFile | from AbstractStreamWriter | |
| protected string | $delimiter | Delimiter in csv file | |
| protected string | $enclosure | String enclosure in csv file | |
| protected bool | $utf8Encoding | Indicates if file is in utf8 encoding | |
| protected array|null | $header | File header |
Methods
__construct(string $delimiter = ',', string $enclosure = '"', resource $stream = null, bool $utf8Encoding = false)
No description
mixed
prepare()
Prepare the writer before writing the items
setCloseStreamOnFinish(bool $closeStreamOnFinish = true)
Should underlying stream be closed on finish?
from AbstractStreamWriter
mixed
mixed
__destruct()
Destructor
Details
at line 50
__construct(string $delimiter = ',', string $enclosure = '"', resource $stream = null, bool $utf8Encoding = false)
in AbstractStreamWriter at line 49
AbstractStreamWriter
setStream(mixed $stream)
Set Stream Resource
in AbstractStreamWriter at line 68
resource
getStream()
Get underlying stream resource
at line 63
mixed
prepare()
Prepare the writer before writing the items
in AbstractStreamWriter at line 89
$this
finish()
Wrap up the writer after all items have been written
in AbstractStreamWriter at line 105
AbstractStreamWriter
setCloseStreamOnFinish(bool $closeStreamOnFinish = true)
Should underlying stream be closed on finish?
in AbstractStreamWriter at line 117
bool
getCloseStreamOnFinish()
Is Stream closed on finish?
in AbstractStreamWriter at line 127
static string
convertCollection(mixed $collection)
in AbstractStreamWriter at line 145
mixed
writeCollection(mixed $collection)
in AbstractStreamWriter at line 160
string
writeCustomCollection(mixed $collection)
at line 75
mixed
writeItem(CSVEntityInterface $entity)
at line 90
mixed
writeCustomItem(PrimaryKeyInterface $entity)
at line 110
__destruct()
Destructor