[owncloud-devel] Best way to register a Hook
dev at bernhard-posselt.com
Fri Apr 10 07:23:33 GMT 2015
The second method is preferred, the first one is the legacy way to do
it. The reason why there are two different ways is that most devs dont
update the dev docs when they are adding new features or change stuff.
On 04/09/2015 09:07 PM, Daniel Araujo Melo wrote:
> Hi all,
> What is the best way to register a Hook?
> Owncloud's App Development Documentation presents 2 different ways:
> Using \OCP\Util::connectHook, as presented in https://doc.owncloud.org/server/8.0/developer_manual/app/init.html
> $userManager->listen('\OC\User', 'preDelete', $callback);
> as presented in https://doc.owncloud.org/server/8.0/developer_manual/app/hooks.html
> There's any drawback related with any of them?
> Devel mailing list
> Devel at owncloud.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel