ILIAS
Release_5_0_x_branch Revision 61816
|
The main class for parsing RIS files. More...
Public Member Functions | |
__construct ($options=array()) | |
parseFile ($filename, $context=NULL) | |
Parse an RIS file. | |
parseString ($string) | |
Parse a string of RIS data. | |
getRecords () | |
printRecords () |
Data Fields | |
const | RIS_EOL = "\r\n" |
const | LINE_REGEX = '/^(([A-Z1-9]{2})\s+-(.*))|(.*)$/' |
Protected Member Functions | |
parseArray ($lines) | |
Take an array of lines and parse them into an RIS record. | |
cleanData (&$lines) | |
Clean up the data before processing. |
Protected Attributes | |
$data = NULL |
The main class for parsing RIS files.
Usage:
The data structure generated by this class is of the form
Definition at line 60 of file RISReader.php.
LibRIS\RISReader::__construct | ( | $options = array() | ) |
Definition at line 67 of file RISReader.php.
|
protected |
Clean up the data before processing.
array | $lines | Indexed array of lines of data. |
Definition at line 179 of file RISReader.php.
LibRIS\RISReader::getRecords | ( | ) |
Definition at line 155 of file RISReader.php.
|
protected |
Take an array of lines and parse them into an RIS record.
Definition at line 119 of file RISReader.php.
LibRIS\RISReader::parseFile | ( | $filename, | |
$context = NULL |
|||
) |
Parse an RIS file.
This will parse the file and return a data structure representing the record.
string | $filename | The full path to the file to parse. |
StreamContext | $context | The stream context (in desired) for handling the file. |
array | An indexed array of individual sources, each of which is an associative array of entry details. (See LibRIS) |
Definition at line 86 of file RISReader.php.
References $filename.
LibRIS\RISReader::parseString | ( | $string | ) |
Parse a string of RIS data.
This will parse an RIS record into a representative data structure.
string | $string | RIS-formatted data in a string. |
StreamContext | $context | The stream context (in desired) for handling the file. |
array | An indexed array of individual sources, each of which is an associative array of entry details. (See LibRIS) |
Definition at line 110 of file RISReader.php.
LibRIS\RISReader::printRecords | ( | ) |
Definition at line 160 of file RISReader.php.
|
protected |
Definition at line 64 of file RISReader.php.
const LibRIS\RISReader::LINE_REGEX = '/^(([A-Z1-9]{2})\s+-(.*))|(.*)$/' |
Definition at line 63 of file RISReader.php.
const LibRIS\RISReader::RIS_EOL = "\r\n" |
Definition at line 62 of file RISReader.php.