Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\Iterators\CsvFileIterator Class Reference
Inheritance diagram for SMW\Iterators\CsvFileIterator:
Inheritance graph
[legend]
Collaboration diagram for SMW\Iterators\CsvFileIterator:
Collaboration graph
[legend]

Public Member Functions

 __construct ( $file, $parseHeader=false, $delimiter=",", $length=8000)
 
 __destruct ()
 
 count ()
 
 getHeader ()
 
 rewind ()
 
 current ()
 
 key ()
 
 next ()
 
 valid ()
 

Detailed Description

See also
http://php.net/manual/en/function.fgetcsv.php

GNU GPL v2+

Since
3.0

Constructor & Destructor Documentation

◆ __construct()

SMW\Iterators\CsvFileIterator::__construct (   $file,
  $parseHeader = false,
  $delimiter = ",",
  $length = 8000 
)
Since
3.0
Parameters
string$file
boolean$parseHeader
string$delimiter
integer$length

◆ __destruct()

SMW\Iterators\CsvFileIterator::__destruct ( )
Since
3.0

Member Function Documentation

◆ count()

SMW\Iterators\CsvFileIterator::count ( )
See also
Countable::count
Since
2.5

◆ current()

SMW\Iterators\CsvFileIterator::current ( )

Returns the current CSV row as a 2 dimensional array

Since
3.0

◆ getHeader()

SMW\Iterators\CsvFileIterator::getHeader ( )
Since
3.0
Returns
[]

◆ key()

SMW\Iterators\CsvFileIterator::key ( )

Returns the current row number.

Since
3.0

◆ next()

SMW\Iterators\CsvFileIterator::next ( )

Checks if the end of file is reached.

Since
3.0

◆ rewind()

SMW\Iterators\CsvFileIterator::rewind ( )

Resets the file handle

Since
3.0

◆ valid()

SMW\Iterators\CsvFileIterator::valid ( )

Checks if the next row is a valid row.

Since
3.0

The documentation for this class was generated from the following file:

About | General disclaimer | Privacy policy