[dev] Cyclic dependencies in binders

Jan Schneider jan at horde.org
Fri May 7 14:21:34 UTC 2010


There's a problem with creating binders for objects with cyclic dependencies.

I'm currently refactoring Horde_Alarm, and it depends on  
Horde_Notification if displaying alarms as notifications.  
Horde_Notification OTOH depends on Horde_Alarm because it triggers the  
alarm system before displaying notifications, so that it can push any  
new alarms on the stack right before.

Theoretically I would have two binders and both use the injector to  
get the other object. But this obviously leads to an endless loop.

Any ideas how to solve this?

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list