Re: Virtual Filesystem
| From: | Chuck Hagenbuch | Date: | Fri, 27 Sep 2002 18:16:28 +0000 |
| Subject: | Re: Virtual Filesystem | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-9620@lists.php.net to get a copy of this message | ||
Quoting Alan Knowles <alan@akbkhome.com>:
> class Horde_VFS_Object_file extends Horde_VFS_Object {
I don't understand why you'd need to duplicate the backends. Why not just
have Horde_VFS_File and Horde_VFS_Directory (or Folder, either way) classes,
that wrapped the appropriate methods and stored internal references to a VFS
backend instance?
> If a new driver is written for the object one, then the Horde_VFS,
> could provide a wrapper to it in a similar way...
I see no reason to put backend code into the object drivers. You could even
keep the API clean with a simple Horde_VFS_Object interface that wrapped a
VFS backend instance in an object API, for any methods that the File and
Directory objects mentioned above didn't cover. 3 classes, max, and you keep
all the existing code and duplicate little to none of it...
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
"People ask me all the time what it will be like living without otters."
- Google, thanks to Harpers