On second thought, it makes more sense to have Zend_Parser_Interface Zend_Parser_DataSource_Interface*
Neither with concrete classes (like SPL). Then Zend_File can implement Zend_Parser_DataSource_Interface and Zend_File_Parser can implement Zend_Parser_Interface. I'll look into this more thoroughly tonight. I can see all kinds of applications for it. -Matt * There's probably a better name for this. On Sat, March 31, 2007 2:42 pm, Kevin McArthur wrote: > We suggested this when it was written (and I'm yet to have fully > translated > the image parsers to use the new one, open issue yadayada) so if you're > going to create a proper fileparser class, do it soon and we can update > the > outstanding changes to use the new class. > > Willie wrote this class when getting the font support for zpdf going and > its > quite robust. > > We suggested a generalized parser, but we've barely got the time to handle > our own backyard let alone push through a full proposal etc. However, that > was our intent for this stuff; after we wrote 4 or 5 specific format > parsers > and said *wtf* =P > > So ya, proposal sounds good, push it through n such. > > Kevin > > > > ----- Original Message ----- > From: "Matthew Ratzloff" <[EMAIL PROTECTED]> > To: "Kevin McArthur" <[EMAIL PROTECTED]> > Cc: <[email protected]> > Sent: Saturday, March 31, 2007 2:15 PM > Subject: Re: [fw-general] Zend_File_Parser, Zend_String, etc. (was: > Operating with file system: OO approach) > > >> LOL >> >> Naturally, you post this after I spend part of my weekend writing a byte >> parser with similar functionality. :-D >> >> This needs to split off into its own component ASAP. Additional >> functionality can get filled in as it comes. Some really useful stuff >> in >> there for file parsing. >> >> The current files: >> >> Zend_Pdf_FileParser >> Zend_Pdf_FileParserDataSource (abstract) >> Zend_Pdf_FileParserDataSource_File extends Zend_Pdf_FileParserDataSource >> Zend_Pdf_FileParserDataSource_String extends >> Zend_Pdf_FileParserDataSource >> >> Zend_Pdf_FileParser_DataSource can pretty easily become an interface >> instead. Perhaps: >> >> Zend_File_Parser >> Zend_File_Interface >> Zend_File implements Zend_File_Interface >> Zend_String implements Zend_File_Interface >> >> I have one or two ideas for a Zend_String class. The first is a method >> for converting "stringified" string literals (for instance, '\x00', as >> opposed to "\x00") to their literal value. This is necessary when >> parsing >> magic files (see my Zend_Mime_Magic proposal). I'm sure others can >> think >> of ideas for that as well. >> >> -Matt >> >> On Sat, March 31, 2007 1:33 pm, Kevin McArthur wrote: >>> There is also an excellent binary file parser in Zend_Pdf if you need >>> to >>> parse a binary file format. >>> >>> Kevin >>> ----- Original Message ----- >>> From: "Ralph Schindler" <[EMAIL PROTECTED]> >>> To: "Ivan Ruiz Gallego" <[EMAIL PROTECTED]> >>> Cc: <[email protected]> >>> Sent: Saturday, March 31, 2007 1:25 PM >>> Subject: Re: [fw-general] Operating with file system: OO approach >>> >>> >>>> Have you looked into the SPL? >>>> >>>> http://www.php.net/~helly/php/ext/spl/ >>>> >>>> Specifically: DirectoryIterator, SPLFileInfo, SplFileObject >>>> >>>> You might find some useful information and File/Directory patterns in >>>> there. >>>> >>>> -ralph >>>> >>>> Ivan Ruiz Gallego wrote: >>>>> Hello Matt, >>>>> >>>>> Well. In first instance I am thinking about the basic file system >>>>> related >>>>> operations like: create, remove, rename, move, copy or find >>>>> directories >>>>> and files. Basically, what we can already do, but in an >>>>> object-oriented >>>>> manner. In addition to this, I have been also thinking about a >>>>> something >>>>> like a recycle bin. >>>>> >>>>> Regards, >>>>> Ivan. >>>>> >>>>> Matthew Ratzloff schrieb: >>>>>> There has been some light discussion in this area. Do you have any >>>>>> suggestions for what a component like this should be capable of >>>>>> doing? >>>>>> >>>>>> -Matt >>>>>> >>>>>> On Sat, March 31, 2007 9:31 am, Ivan Ruiz Gallego wrote: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> I am looking for a class or a set of classes that allow an >>>>>>> object-oriented operation with the file system. I am working now >>>>>>> with >>>>>>> SPL and I have also taken a look to PEAR, but I haven't so far >>>>>>> found >>>>>>> a >>>>>>> comprehensive solution. As far as I know is such a library not >>>>>>> included >>>>>>> in Zend Framework. >>>>>>> >>>>>>> Here my questions: >>>>>>> - Is the inclusion of such functionality planed within Zend >>>>>>> Framework? >>>>>>> - Does anyone know about such a library? >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> Best regards, >>>>>>> Ivan. >>>>>>> >>>>>>> -- >>>>>>> Loglan GmbH >>>>>>> Ivan Ruiz Gallego >>>>>>> >>>>>>> Binzmühlestrasse 210 >>>>>>> 8050 Zürich >>>>>>> Switzerland >>>>>>> >>>>>>> Office +41 44 310 19 20 >>>>>>> Mobile +41 76 321 23 68 >>>>>>> Net www.loglan.net >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Loglan GmbH >>>>> Ivan Ruiz Gallego >>>>> >>>>> Binzmühlestrasse 210 >>>>> 8050 Zürich >>>>> Switzerland >>>>> >>>>> Office +41 44 310 19 20 >>>>> Mobile +41 76 321 23 68 >>>>> Net www.loglan.net >>>>> >>>> >>> >>> >> >> > >
