rfc:streamline-phar-api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:streamline-phar-api [2008/03/28 15:17] – Adding directory iterator adjustments lstrojnyrfc:streamline-phar-api [2008/03/28 15:42] – Adding proposal for SplFileObject lstrojny
Line 8: Line 8:
 ===== Abstract ===== ===== Abstract =====
 This proposal aims to streamline the Phar API to make it more usable and intuitive.  This proposal aims to streamline the Phar API to make it more usable and intuitive. 
-===== Concrete change proposals =====+===== Basic change proposals =====
  
  
Line 113: Line 113:
 $file = $iterator['file']; $file = $iterator['file'];
 </code> </code>
 +
 +==== SplFileObject ====
 +=== Overload getContent()/setContent() ===
 +It is necessary to overload getContent()/setContent() in SplFileObject to properly reset internal flags. This is merely an implementation detail of the SplFileInfo::getContent()/setContent().
 +
 +===== Extended change proposals =====
 +==== SplFileObject ====
 +=== Rename methods ===
 +== Renamed methods ==
 +  * eof() => isEndOfFile()
 +  * fflush() => flush()
 +  * fgetc() => getChar()
 +  * fgetcvs() => getCsv()
 +  * fgets() => getLine()
 +  * fgetss() => getStripped()
 +  * flock() => lock()
 +  * fpassthru() => getRest()
 +  * fseek() => seek()
 +  * fstat() => stat()
 +  * ftell() => getLine()
 +  * ftruncate() => truncate()
 +  * fwrite() => write()
 +== Proposal ==
 + Rename this methods to make their names more OO-alike, but leave the old names as deprecated aliases and remove them in PHP 6. This belongs to the extended change proposal as it would be practical to do but is not strictly related to Phar.
rfc/streamline-phar-api.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1