[PEPr] Comment on File System::File_Mogile
| From: | Steve Williams | Date: | Fri, 01 Feb 2008 23:46:11 +0000 |
| Subject: | [PEPr] Comment on File System::File_Mogile | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49062@lists.php.net to get a copy of this message | ||
Steve Williams (http://pear.php.net/user/sbw) has commented on the proposal for File
System::File_Mogile.
Comment:
Right now, File_Mogile is configured through static class properties.
Example:
File_Mogile::$curlTimeout = 4;
I considered switching to a setopt() method or individual methods like
setCurlTimeout().
But two of the timeout configs are used only when the File_Mogile object
is instantiated--which is when the connection to the MogileFS tracker is
made. So this wouldn't work:
$mogile = new File_Mogile(array('example.com:7201', 'mydomain');
$mogile->setSocketTimeout(0.01);
I could fix that by deferring the connection until the first command is
issued, but that's more complex and would make documenting the set...()
methods more complex.
If more experienced PEAR folks have a strong preference for set...()
methods, I'll change it. But my inclination is to leave the configs in the
static properties.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=528
--
Sent by PEPr, the automatic proposal system at http://pear.php.net