Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.5dev1

Request #10593 Option to change fileWriteMode
Submitted: 2007-04-02 18:37 UTC
From: ice5nake Assigned: wiesemann
Status: Closed Package: Structures_DataGrid_Renderer_CSV
PHP Version: 4.4.4 OS: Windows XP and Red Hat
Roadmaps: (Not assigned)    
Subscription  


 [2007-04-02 18:37 UTC] ice5nake (Anthony Topper)
Description: ------------ I would like to see an option added that would make it possible to change the write mode when saving to a file. What I would like to do is append to the end of a file. Like so. $this->_addDefaultOptions( array( 'delimiter' => ',', 'filename' => false, 'saveToFile' => false, 'enclosure' => '"', 'lineBreak' => "\n", 'useQuotes' => "auto", 'fileWriteMode' => 'wb' ) ); And ... $this->_fp = fopen($this->_options['filename'], $this->_options['fileWriteMode']);

Comments

 [2007-04-02 20:39 UTC] wiesemann (Mark Wiesemann)
I guess that you don't want to have such a new option only in the documentation? ;-) I've corrected the package selection, and will take care of adding this feature. Please try to select the right package next time.
 [2007-04-03 13:14 UTC] ice5nake (Anthony Topper)
"Please try to select the right package next time." The code I example I placed in the commment was from my \Structures\DataGrid\Renderer\CSV.php file. The first part started on line 107 and the second part was line 139. Isn't this the Structures_DataGrid_Renderer_CSV package? Or did you correct the package I had selected? Thanks for the quick response.
 [2007-04-03 14:02 UTC] wiesemann (Mark Wiesemann)
> Isn't this the Structures_DataGrid_Renderer_CSV package? > Or did you correct the package I had selected? Yes, I had corrected it. Initially, "Documentation" was selected in the package selection box.
 [2007-04-21 14:07 UTC] wiesemann (Mark Wiesemann)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/Structures_DataGrid_Renderer_CSV --- I've chosen a slightly short name for the new option and have adopted the changed also to the XML renderer (might not be that useful there, but it doesn't hurt).