◆ __construct()
ilCSVReader::__construct |
( |
| ) |
|
◆ close()
Definition at line 99 of file class.ilCSVReader.php.
102 ini_set(
"auto_detect_line_endings", $this->line_ends);
104 return( @fclose($this->ptr_file) );
◆ getDataArrayFromCSVFile()
ilCSVReader::getDataArrayFromCSVFile |
( |
| ) |
|
Get data as array from csv file.
public
- Returns
- array $this->data Data of file
Definition at line 114 of file class.ilCSVReader.php.
References $data, $row, data, and unquote().
118 while (($line = fgetcsv($this->ptr_file, $this->length, $this->separator)) !== FALSE)
120 for ($col = 0; $col < count($line); $col++)
◆ open()
ilCSVReader::open |
( |
|
$file = "" | ) |
|
Definition at line 90 of file class.ilCSVReader.php.
References $file, and ilUtil\stripSlashes().
93 $this->line_ends = ini_get(
"auto_detect_line_endings");
94 ini_set(
"auto_detect_line_endings",
true);
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
◆ setDelimiter()
ilCSVReader::setDelimiter |
( |
|
$a_del | ) |
|
Set delimiter.
public
- Parameters
-
Definition at line 73 of file class.ilCSVReader.php.
75 $this->delimiter = $a_del;
◆ setLength()
ilCSVReader::setLength |
( |
|
$a_length | ) |
|
◆ setSeparator()
ilCSVReader::setSeparator |
( |
|
$a_sep | ) |
|
◆ unquote()
ilCSVReader::unquote |
( |
|
$a_str | ) |
|
|
private |
◆ $data
ilCSVReader::$data = array() |
|
private |
◆ $delimiter
ilCSVReader::$delimiter = '""' |
|
private |
◆ $length
ilCSVReader::$length = 1024 |
|
private |
◆ $ptr_file
ilCSVReader::$ptr_file = null |
|
private |
◆ $separator
ilCSVReader::$separator = ';' |
|
private |
The documentation for this class was generated from the following file: