Hi,

On 2/15/08, Thomas Koch <[EMAIL PROTECTED]> wrote:
> I started to evaluate SignalSlot for inclusion in an eZP module to handle the
> user registration process. The process should be pluggable, so that you can
> release arbitrary actions on every registration step.
> For the system I need the possibility to return values from slots or to abort
> the slot execution. Both could be achieved with a little addition to the emit
> method:
>
> instead of
>                     call_user_func_array( $callback, $parameters );
> in lines 294, 301, ... one could write
>
>                     $return = NULL;
>                      ....
>                     $return = call_user_func_array( $callback, $parameters );
>                     if( NULL !== $return ) return $return;
This works for your specific need where you only want the return value
of the slot last run. However, you also have the case where all slots
are run. Which return value do you return then?
You really only have two options: return all of them or none.
Returning all has the issue that you don't know which slot returned
what value (you really should not know at all actually..). Slots could
even return values of different types.

>
> I also tried to send variables as references to the slots, but func_get_args
> returns only copies of the parameters. Does anybody knows, if this is
> intended or a bug?
This is intended. Slots should not have to worry about changes applied
to the input parameters by other slots called before them.

> Do you know, if and how the SignalSlot component should be integrated in eZP?
> We had the idea to connect signals to slots via the eZP-ini system.
That is an option. I was thinking of some sort of on demand loading
system at the time. I can't really remember any details though :(

Cheers,
Frederik
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to