This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
More...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning
Definition at line 19 of file class.ilCSVReader.php.
◆ close()
◆ getCsvAsArray()
ilCSVReader::getCsvAsArray |
( |
| ) |
|
◆ open()
ilCSVReader::open |
( |
string |
$path_to_file | ) |
|
◆ parse()
Definition at line 32 of file class.ilCSVReader.php.
References unquote().
Referenced by getCsvAsArray().
36 while (($line = fgetcsv($this->file_resource, $this->length, $this->separator, $this->escape)) !==
false) {
37 $line_count = count($line);
38 for ($col = 0; $col < $line_count; $col++) {
39 $this->data[$row][$col] = $this->
unquote($line[$col]);
◆ setDelimiter()
ilCSVReader::setDelimiter |
( |
string |
$a_del | ) |
|
◆ setLength()
ilCSVReader::setLength |
( |
int |
$a_length | ) |
|
◆ setSeparator()
ilCSVReader::setSeparator |
( |
string |
$a_sep | ) |
|
◆ unquote()
ilCSVReader::unquote |
( |
string |
$a_str | ) |
|
|
private |
Definition at line 83 of file class.ilCSVReader.php.
Referenced by parse().
85 return str_replace($this->delimiter . $this->delimiter, $this->delimiter, $a_str);
◆ $data
array ilCSVReader::$data = [] |
|
private |
◆ $delimiter
string ilCSVReader::$delimiter = '""' |
|
private |
◆ $escape
string ilCSVReader::$escape = '\\' |
|
private |
◆ $file_resource
ilCSVReader::$file_resource |
|
private |
◆ $length
int ilCSVReader::$length = 1024 |
|
private |
◆ $line_ends
string ilCSVReader::$line_ends |
|
private |
◆ $separator
string ilCSVReader::$separator = ';' |
|
private |
The documentation for this class was generated from the following file: