Robust PHP MogileFS Client

Erik Osterman e at osterman.com
Tue Jul 3 02:16:19 UTC 2007


Using a READFUNCTION callback is not a bad suggestion, if it works with 
PUTs. I liked using the streams for over all consistency so the "set" 
and "setFile" methods could use the same setResource method. I'll see 
about introducing a way of using a CURLOPT_READFUNCTION or at the very 
least make it so it's more easily extended. As for backwards 
compatibility, I am much less inclined to maintain the code for PHP4 
support, which would among other things you mentioned also require 
dropping the protected/private/public keywords for methods and 
properties. That said, it being under GPL now, I have nothing against 
other people forking off the code for PHP4.

Thanks!

Erik


Robin H. Johnson wrote:
> On Sat, Jun 30, 2007 at 06:37:13PM -0700, Erik Osterman wrote:
>   
>>  We are releasing our MogileFS PHP5 client under the terms of the GPL 
>>  license. This class requires PHP 5.1 or greater due to the use of memory 
>>  based streams. I have attached the current version to this email.
>>     
> I like the concepts here, but why didn't you consider using CURL's
> READFUNCTION instead of writing the data to a memory-stream and then
> reading it back?
>
> READFUNCTION should give you full PHP4 support for dealing with the CURL
> PUT problem you mentioned on your blog. (Plus rip out the exceptions
> later to give PHP4 compat).
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/mogilefs/attachments/20070702/40858098/attachment.html


More information about the mogilefs mailing list