Download the PHP package eltharin/webdav without Composer
On this page you can find all versions of the php package eltharin/webdav. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package webdav
Symfony WebDav Bundle
What is WebDav Bundle?
This bundle allow to create a webdav server running in your symfony application, you can use same credentials and have the same ACL logic.
Installation
- Require the bundle with composer:
and then add a file for add the routes loader :
this file can be found in /vendor/eltharin/webdav/config/routes and put in /config/routes
If you want enable Basic Authenticator for at less one of your configurations, you have to add a firewall in your security.yaml :
Configuration
- Create a configuration, for one webdav space, you can have as configurations you want, each have to start by only one start :
Start creating PHP Classe whitch extends Eltharin\WebdavBundle\Interface\AbstractWebDavConfiguration you have two stubs to implements, getRouteData and getFileManager :
RouteData is an object represents the route used to obtain this webdav endpoint. It seems the basic symfony route configuration, you must set the path to access this endpoint, and you can set requirement too.
The webdav file path will be set a the end of this string, don't call your variables path.
or
the generated routes will be /webdav/{path} and /webdav/{uuid}/path where path will be .*, path can contain / caracter for subfolders.
There is one fileManager for storing files on disk, root folder is configurable for this example %root%/var/data/ create this directory and add fileManager configuration :
and we have our configuration :
Add more security
for add security, WebDAv bundle include Authenticator and EntryPoint for Basic Authentication, verify you have add the firewall as say in installation part.
in your configuration where you want add security, you must add the security manager in the construct function for fill $securityManager variable:
and add an access_control item in your security.yaml file :
Now you must be connected with ROLE_USER to access your files.
If you want more security levels, you can extends WebDavFileManager Class and implements the checkAutorization function or write your own class.
TODO:
- DB File Manager
- CalDav CardDav