If we keep the old hook system we run into the problem that we won't be able to get rid of it in the future.

Sent from my Windows Phone
________________________________
From: Thomas Müller<mailto:notifications@github.com>
Sent: ‎27-‎9-‎2013 12:26
To: owncloud/core<mailto:core@noreply.github.com>
Cc: icewind1991<mailto:robin@icewind.nl>
Subject: Re: [core] Public API for OC6+ (includes AppFramework) (#4459)

> +     public function openEventSource(){
> +             # TODO: use public api
> +             return new \OC_EventSource();
> +     }
> +
> +     /**
> +      * @brief connects a function to a hook
> +      * @param string $signalClass class name of emitter
> +      * @param string $signalName name of signal
> +      * @param string $slotClass class name of slot
> +      * @param string $slotName name of slot, in another word, this is the
> +      *               name of the method that will be called when registered
> +      *               signal is emitted.
> +      * @return bool, always true
> +      */
> +     public function connectHook($signalClass, $signalName, $slotClass, $slotName) {

Looks like we need some more discussion on this - can we please open a new issue on this topic?

For oc6 I'd prefer to keep hooks/listeners/event dispatchers out of the new api-
Apps can still use the existing OCP\Hook mechanism - we need to keep that anyhow at least for oc6.

For oc7+ we will introduce whatever the discussion result will be.

@bartv2 @icewind1991 @karlitschek objections? THX

---
Reply to this email directly or view it on GitHub:
https://github.com/owncloud/core/pull/4459/files#r6624990