42 $this->_delimiter = isset(
$config[
'delimiter']) ?
$config[
'delimiter'] :
',';
43 $this->_enclosure = isset(
$config[
'enclosure']) ?
$config[
'enclosure'] :
'"';
55 if (isset(
$config[
'baseDir'])) {
70 $fileHandle =
fopen($this->_filePath,
'w');
72 throw new \RuntimeException(sprintf(
'Can not open a file "%s".', $this->_filePath));
75 $lockRequired = strpos($this->_filePath,
'php://') !== 0;
77 while ($lockRequired && !$isLocked) {
78 $isLocked = flock($fileHandle, LOCK_EX);
82 flock($fileHandle, LOCK_UN);
98 foreach ($this->_columns as $column) {
101 fputcsv($fileHandle,
$row, $this->_delimiter, $this->_enclosure);
_renderColumnValue($value, $columnKey)
_writeFileContent($fileHandle, Stat $stat)
_parseFilePath(array $config=null)
__construct(array $config=null)