On Apr 30, 2013, at 2:02 PM, Antonello Carlomagno <
anto...@carlomagno.net> wrote:
> Hello,
>
> I'm trying to create a webDAv file system
> Each user must own folder in order to save own documents.
>
> well,
>
> the authentication works fine with mysql db, but I have problem to understand how to they work directory / file class.
>
> looking the examples, I tried to create a server.php ...
>
> the lines:
>
> $publicDir = 'public';
> $rootDirectory = new \MyCollection($publicDir);
>
> All the users after login they see all directory tree ... if set $publicDir with 'public'.$userDir ... each user see only own directory tree.
>
> it's correct ? I seem too simple ... or not ?
If this is the behavior you are after, then I would say it's correct.
But it doesn't make sense to then use that \MyCollection class. It was intended as a simple example on how you to create new behavior in the tree, so since you are not actually changing anything from the the default behavior, you should use \Sabre\DAV\FS\Directory
> I have trouble with the syntax of PHP OOP ... I develop in Delphi (object pascal) and I struggle to understand .... but I am working hard. :-)
It will be incredibly hard for you to do any sort of customization if you don't have a full understanding of PHP's object model.
Evert