Re: Package Scope Recommendations for File_Ogg

From: Date: Thu, 14 Aug 2003 16:47:02 +0000
Subject: Re: Package Scope Recommendations for File_Ogg
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19761@lists.php.net to get a copy of this message
On 14 Aug 2003 at 17:25, David Grant wrote: > > David Grant wrote: > >> So to clarify: > >> function foo() > >> { > > ... > >> Correct? > > In this style yes. For your package i would suggest a kind of > > factory function, ie File_Ogg::file() which could returns a > > File_Ogg_PHP object if no extension is found or File_Ogg_Wrapper if > > an OggVorbis-Extension exists - as is named it is just a wrapper for > > the extension. > > That's a sound idea, and one that'll certainly save a load of > processing. > > Is there a common standard for this type of thing within PEAR, and > what do you recommend doing for all the inheriting classes, such as > File_Ogg_Vorbis? > > I intend to use File_Ogg to provide access to instances of the various > inheriting classes corresponding to the logical streams found inside > an Ogg file. Should I also write a series of wrappers for these > particular logical bitstreams? > > e.g. > > $x = File_Ogg::file("foo.ogg") returns an instance of File_Ogg_PECL if > the extensions is loaded. $x->getLogicalStream(1) returns an instance > of File_Ogg_Vorbis_PECL? Right? > > This package just keeps getting bigger! To think that once I had only > thought of extracting the comments from an Ogg Vorbis file. Now we > have multiple streams and wrapper classes for as-yet non-existant PECL > extension! And with no guarantee of the work being accepted into PEAR > either! :) "Don't fear the reaper!" - just a quotation :-) Well, I'm sure since the package has been discussed in-depth the last days and since it's a very good extension to pear / pecl in my eyes it will go through. The concept seems quite complete already :-)) Stefan

« previous php.pear.dev (#19761) next »