Make wirebox.system.aop.Mixer listener load automatically

Description

If I want to use the AOP functionality in WireBox I have to add 2 things to my Wirebox Binder CFC:

1. listeners = [ { class="wirebox.system.aop.Mixer", properties={} } ]

2. my various mapAspect() and bindAspect() methods.

The mapAspect() and bindAspect() calls of course make sense, that’s how I’m telling WireBox which things to configure. But if I don’t add:

listeners = [ { class="wirebox.system.aop.Mixer", properties={} } ]

…none of that works.

It’d be nice if this listener could be automatically enabled behind the scenes just by the sheer fact that I’m calling mapAspect()/bindAspect() in my Binder. That would cut down one copy/paste step when using AOP in Wirebox.

If I need to use a custom listener, then yes I understand the need for adding “listeners = [ … ]” into my Binder. But for this default behavior, why not let users skip that step and get rid of some boilerplate?

Just a thought. I mentioned it to Brad at Into The Box and he suggested I make a ticket for it. So here you go.

Thanks!

Assignee

Luis Majano

Reporter

Nolan Erck

Labels

None

Priority

Trivial
Configure