|
SPL-StandardPHPLibrary
|


Public Member Functions | |
| __construct ($file_name, $open_mode= 'r', $use_include_path=false, $context=NULL) | |
| __toString () | |
| current () | |
| eof () | |
| fflush () | |
| fgetc () | |
| fgetcsv ($delimiter=NULL, $enclosure=NULL) | |
| fgets () | |
| fgetss ($allowable_tags=NULL) | |
| flock ($operation, &$wouldblock) | |
| fpassthru () | |
| fscanf ($format) | |
| fseek ($pos, $whence=SEEK_SET) | |
| fstat () | |
| ftell () | |
| ftruncate ($size) | |
| fwrite ($str, $length=NULL) | |
| getATime () | |
| getChildren () | |
| getCsvControl ($delimiter= ',', $enclosure= '"') | |
| getCTime () | |
| getCurrentLine () | |
| getFileInfo (string class_name=NULL) | |
| getFilename () | |
| getFlags () | |
| getGroup () | |
| getInode () | |
| getLinkTarget () | |
| getMaxLineLen () | |
| getMTime () | |
| getOwner () | |
| getPath () | |
| getPathInfo (string class_name=NULL) | |
| getPathname () | |
| getPerms () | |
| getRealPath () | |
| getSize () | |
| getType () | |
| hasChildren () | |
| isDir () | |
| isExecutable () | |
| isFile () | |
| isLink () | |
| isReadable () | |
| isWritable () | |
| key () | |
| next () | |
| openFile ($mode= 'r', $use_include_path=false, $context=NULL) | |
| rewind () | |
| seek ($line_pos) | |
| setCsvControl ($delimiter= ';', $enclosure= '"') | |
| setFileClass (string class_name="SplFileObject") | |
| setFlags ($flags) | |
| setInfoClass (string class_name="SplFileInfo") | |
| setMaxLineLen ($max_len) | |
| valid () | |
Public Attributes | |
| const | DROP_NEW_LINE = 0x00000001 |
Private Member Functions | |
| freeLine () | |
| readLine () | |
Private Attributes | |
| $delimiter = ',' | |
| $enclosure = '"' | |
| $flags = 0 | |
| $fname | |
| $fp | |
| $line = NULL | |
| $lnum = 0 | |
| $max_len = 0 | |
Object representation for any stream.
Definition at line 18 of file splfileobject.inc.
| SplFileObject::__construct | ( | $file_name, | |
$open_mode = 'r', |
|||
$use_include_path = false, |
|||
$context = NULL |
|||
| ) |
Constructs a new file object.
| $file_name | The name of the stream to open |
| $open_mode | The file open mode |
| $use_include_path | Whether to search in include paths |
| $context | A stream context |
| RuntimeException | If file cannot be opened (e.g. insufficient access rights). |
Definition at line 42 of file splfileobject.inc.
| SplFileObject::__toString | ( | ) |
Definition at line 359 of file splfileobject.inc.
References current().

| SplFileObject::current | ( | ) |
Implements Iterator.
Definition at line 284 of file splfileobject.inc.
References $line, and getCurrentLine().
Referenced by __toString().

| SplFileObject::eof | ( | ) |
Definition at line 55 of file splfileobject.inc.
Referenced by getCurrentLine(), readLine(), seek(), and valid().
| SplFileObject::fflush | ( | ) |
| SplFileObject::fgetc | ( | ) |
Definition at line 155 of file splfileobject.inc.
References freeLine().

| SplFileObject::fgetcsv | ( | $delimiter = NULL, |
|
$enclosure = NULL |
|||
| ) |
| delimiter | character used as field separator |
| enclosure | end of |
Definition at line 77 of file splfileobject.inc.
References $delimiter, $enclosure, and freeLine().

| SplFileObject::fgets | ( | ) |
increase current line number
Definition at line 63 of file splfileobject.inc.
References freeLine().
Referenced by readLine().

| SplFileObject::fgetss | ( | $allowable_tags = NULL | ) |
Get a line from the file and strip HTML tags.
| $allowable_tags | tags to keep in the string |
Definition at line 175 of file splfileobject.inc.
| SplFileObject::flock | ( | $operation, | |
| & | $wouldblock | ||
| ) |
| operation | lock operation (LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB) |
| $wouldblock | whether the operation would block |
Definition at line 118 of file splfileobject.inc.
| SplFileObject::fpassthru | ( | ) |
Read and return remaining part of stream.
Definition at line 167 of file splfileobject.inc.
|
private |
Free the current line buffer and increment the line counter.
Definition at line 334 of file splfileobject.inc.
Referenced by fgetc(), fgetcsv(), fgets(), fscanf(), getCurrentLine(), next(), readLine(), and rewind().
| SplFileObject::fscanf | ( | $format | ) |
Scan the next line.
| $format | string specifying format to parse |
Definition at line 183 of file splfileobject.inc.
References freeLine().

| SplFileObject::fseek | ( | $pos, | |
$whence = SEEK_SET |
|||
| ) |
| pos | new file position |
| whence | seek method (SEEK_SET, SEEK_CUR, SEEK_END) |
Definition at line 146 of file splfileobject.inc.
| SplFileObject::fstat | ( | ) |
| SplFileObject::ftell | ( | ) |
| SplFileObject::ftruncate | ( | $size | ) |
| SplFileObject::fwrite | ( | $str, | |
$length = NULL |
|||
| ) |
| $str | to write |
| $length | maximum line length to write |
Definition at line 194 of file splfileobject.inc.
References $length.
|
inherited |
| SplFileObject::getChildren | ( | ) |
| SplFileObject::getCsvControl | ( | $delimiter = ',', |
|
$enclosure = '"' |
|||
| ) |
Definition at line 109 of file splfileobject.inc.
|
inherited |
| SplFileObject::getCurrentLine | ( | ) |
Definition at line 346 of file splfileobject.inc.
References eof(), freeLine(), and readLine().
Referenced by current(), and seek().

|
inherited |
| class_name | name of class to instantiate |
|
inherited |
| SplFileObject::getFlags | ( | ) |
|
inherited |
|
inherited |
|
inherited |
| SplFileObject::getMaxLineLen | ( | ) |
Definition at line 242 of file splfileobject.inc.
References $max_len.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| class_name | name of class to instantiate |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| SplFileObject::hasChildren | ( | ) |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| SplFileObject::key | ( | ) |
Implements Iterator.
Definition at line 301 of file splfileobject.inc.
References $lnum.
| SplFileObject::next | ( | ) |
Invalidate current line buffer.
Implements Iterator.
Definition at line 308 of file splfileobject.inc.
References freeLine().

|
inherited |
Open the current file as a SplFileObject instance.
| mode | open mode |
| use_include_path | whether to search include paths (don't use) |
| context | resource context to pased to open function |
| RuntimeException | if file cannot be opened (e.g. insufficient access rights). |
|
private |
Definition at line 316 of file splfileobject.inc.
References $line, eof(), fgets(), and freeLine().
Referenced by getCurrentLine().

| SplFileObject::rewind | ( | ) |
Invalidate current line buffer and set line number to 0.
Implements Iterator.
Definition at line 266 of file splfileobject.inc.
References freeLine().
Referenced by seek().

| SplFileObject::seek | ( | $line_pos | ) |
| $line_pos | Seek to this line |
Implements SeekableIterator.
Definition at line 367 of file splfileobject.inc.
References eof(), getCurrentLine(), and rewind().

| SplFileObject::setCsvControl | ( | $delimiter = ';', |
|
$enclosure = '"' |
|||
| ) |
Set the delimiter and enclosure character used in fgetcsv.
| delimiter | new delimiter, defaults to ',' |
| enclosure | new enclosure, defaults to '"' |
Definition at line 100 of file splfileobject.inc.
References $delimiter, and $enclosure.
|
inherited |
| class_name | name of class used with openFile(). Must be derived from SPLFileObject. |
| SplFileObject::setFlags | ( | $flags | ) |
|
inherited |
| class_name | name of class used with getFileInfo(), getPathInfo(). Must be derived from SplFileInfo. |
| SplFileObject::setMaxLineLen | ( | $max_len | ) |
| $max_len | set the maximum line length read |
Definition at line 234 of file splfileobject.inc.
References $max_len.
| SplFileObject::valid | ( | ) |
Implements Iterator.
Definition at line 275 of file splfileobject.inc.
References eof().

|
private |
Definition at line 29 of file splfileobject.inc.
Referenced by fgetcsv(), and setCsvControl().
|
private |
Definition at line 30 of file splfileobject.inc.
Referenced by fgetcsv(), and setCsvControl().
|
private |
Definition at line 28 of file splfileobject.inc.
Referenced by getFlags(), and setFlags().
|
private |
Definition at line 24 of file splfileobject.inc.
|
private |
Definition at line 23 of file splfileobject.inc.
|
private |
Definition at line 25 of file splfileobject.inc.
Referenced by current(), and readLine().
|
private |
Definition at line 26 of file splfileobject.inc.
Referenced by key().
|
private |
Definition at line 27 of file splfileobject.inc.
Referenced by getMaxLineLen(), and setMaxLineLen().
| const SplFileObject::DROP_NEW_LINE = 0x00000001 |
Flag: wheter to suppress new lines.
Definition at line 21 of file splfileobject.inc.
1.8.5