|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| csv_import_reader ($iid, $type) | |
| load_csv_content (&$content, $encoding, $delimiter_name, $column_validation=null) | |
| get_columns () | |
| init () | |
| next () | |
| close () | |
| get_error () | |
| cleanup ($full=false) | |
| get_encoded_delimiter ($delimiter_name) | |
| get_new_iid ($type) | |
Static Public Member Functions | |
| static | get_delimiter_list () |
| static | get_delimiter ($delimiter_name) |
Data Fields | |
| $_iid | |
| $_type | |
| $_error | |
| $_columns | |
| $_fp | |
Definition at line 37 of file csvlib.class.php.
| cleanup | ( | $ | full = false | ) |
Cleanup temporary data
object object
| boolean | $full | true means do a full cleanup - all sessions for current user, false only the active iid |
Definition at line 246 of file csvlib.class.php.


| close | ( | ) |
Release iteration related resources
Definition at line 223 of file csvlib.class.php.

| csv_import_reader | ( | $ | iid, |
| $ | type | ||
| ) |
Contructor
| int | $iid | import identifier |
| string | $type | which script imports? |
Definition at line 65 of file csvlib.class.php.
| get_columns | ( | ) |
Returns list of columns
Definition at line 157 of file csvlib.class.php.

| static get_delimiter | ( | $ | delimiter_name | ) | [static] |
Get delimiter character
| string | separator name |
Definition at line 276 of file csvlib.class.php.

| static get_delimiter_list | ( | ) | [static] |
Get list of cvs delimiters
Definition at line 261 of file csvlib.class.php.

| get_encoded_delimiter | ( | $ | delimiter_name | ) |
Get encoded delimiter character
object
| string | separator name |
Definition at line 294 of file csvlib.class.php.


| get_error | ( | ) |
Get last error
Definition at line 235 of file csvlib.class.php.
| get_new_iid | ( | $ | type | ) |
Create new import id
object
| string | who imports? |
Definition at line 310 of file csvlib.class.php.

| init | ( | ) |
Init iterator.
object object
Definition at line 185 of file csvlib.class.php.

| load_csv_content | ( | &$ | content, |
| $ | encoding, | ||
| $ | delimiter_name, | ||
| $ | column_validation = null |
||
| ) |
Parse this content
object object
| string | $content | passed by ref for memory reasons, unset after return |
| string | $encoding | content encoding |
| string | $delimiter_name | separator (comma, semicolon, colon, cfg) |
| string | $column_validation | name of function for columns validation, must have one param $columns |
Definition at line 81 of file csvlib.class.php.

| next | ( | ) |
Get next line
Definition at line 207 of file csvlib.class.php.
| $_columns |
Definition at line 53 of file csvlib.class.php.
| $_error |
Definition at line 49 of file csvlib.class.php.
| $_fp |
Definition at line 57 of file csvlib.class.php.
| $_iid |
Definition at line 41 of file csvlib.class.php.
| $_type |
Definition at line 45 of file csvlib.class.php.