[dev] WebDAV package v0.1

Jan Schneider jan at horde.org
Thu Oct 22 17:41:31 UTC 2009


Zitat von Evert Pot <evertpot at gmail.com>:

>> [snip]
>> That sounds like a clean approach to me. OTOH we still need similar  
>> functionality for internal browsing, but it doesn't make sense to  
>> use objects extending Sabre_DAV classes for that purpose.
>> Does Sabre require those objects to extend the Sabre classes, or is  
>> it sufficient to implement a certain object API?
>
> You can actually implement the interfaces (Sabre_DAV_INode, IFile,  
> IDirectory).
> The classes are there, because all the methods are already  
> implemented to throw a 'Permission denied' by default, which results  
> in less code.
>
> To find out if an object supports for example directory-like  
> functinality, just the interfaces are checked. As an alternative I  
> had been thinking about using duck-typing, but I ended up preferring  
> interfaces, because it forces developers to be more strict.

That would still add a dependency on Sabre that I rather don't want  
for such a core functionality.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list