Hi Raffael,

I just realized that the version on github was older. I had a newer copy on 
my laptop, which I've just pushed.
Some comments below:

On Monday, January 27, 2014 8:23:48 AM UTC-5, Raffael Luthiger wrote:
>
> Hi Evert,
>
> Thanks for the links. This will help me a lot.
>
> I have some random remarks:
>
> - In the DebugPlugin you do not define how many log levels you have.
>

The new version uses psr/log. The loglevels are defined here:

https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md#5-psrlogloglevel
 

> - Due to the parameters which have to be given in the constructor the 
> plugin can only be used for writing log files. It would not be possible to 
> create a DebugPlugin with a database-based backend. It would be cool if 
> there would be a "backend-neutral" interface which your debug plugin 
> implements. Then other programmers could easily create other debug plugins.
>

Because we're using psr/log, this is now possible :) SabreDAV will not 
provide any default backend, so it is recommended to use something like 
monolog (https://github.com/Seldaek/monolog).
 

> - On the WritingPlugins wiki page it is nowhere written if the initialize 
> method is really needed or not and when exactly it is invoked and with 
> which parameters.
>

I'll give this page an overhaul for the next release. This is a good point 
though. Not everything will be 100% documented in the wiki, most stuff will 
have to be inferred from source.
Here can be seen that is indeed required and it only has one parameter:

https://github.com/fruux/sabre-dav/blob/master/lib/Sabre/DAV/ServerPlugin.php#L27
 

> - On the same page it says "beforeMethod is called whenever any http 
> method handler is called.". Wouldn't it be better to write "beforeMethod is 
> called right before a http method handler is called."? Or does it not 
> happen right before the http method is called?
> - It would be good as well if this page answers as well the question what 
> happens when serveral methods are subscribed to the same event. E.g:
>
> $server->subscribeEvent('beforeMethod','foo');
> $server->subscribeEvent('beforeMethod','bar');
>
> In what order will they be called etc.
>

The upcoming release changes a lot of stuff related to event management. 
This particular bit is pushed to a new component. Detailed documentation is 
here:

https://github.com/fruux/sabre-event

In short:

1. Now use 'on' instead of 'subscribeEvent'
2. Multiple event handlers are indeed allowed
3. No guarantee is given for the order.
4. Unless you specify the third argument, $priority. Lower priority is 
earlier.


> These are just a few questions that came to my mind when reading the two 
> pages. It would be great if you would find the time to update the wiki page 
> etc.
>

I'll work on a new version this afternoon =)

Evert

-- 
You received this message because you are subscribed to the Google Groups 
"SabreDAV Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sabredav-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to sabredav-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/sabredav-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to