PureMVC Architects Lounge

PureMVC Manifold => Standard Version => Topic started by: saad on September 27, 2013, 11:12:11



Title: feature request
Post by: saad on September 27, 2013, 11:12:11
Hi Cliff:

Possible that if you can implement a change across all the ports in your next release, that the registerProxy function returns the proxy after calling onRegister function. Same with registerMediator, that it should return the registered mediator.

I run into a case where I had to register sub-proxies and sub-mediators inside proxies and mediators (onRegister function) and had to write additional lines to retrieve them.

I added return at the end for Facade, Model and View for registerProxy and registerMediator functions for this PHP port and wish that if it becomes part of all other ports. Any thoughts?

Regards.


Title: Re: feature request
Post by: puremvc on October 14, 2013, 10:24:36
You already have the Proxy in hand, before and after you make the register call.


Title: Re: feature request
Post by: saad on December 06, 2013, 10:16:50
you're right, but following approach is helpful (from visibility point of view) and reduces lines of code when I've several proxy or mediator instantiations going on in one place.

this.testProxy = this.facade.registerProxy(new TestProxy());
instead of another short form (this.facade.registerProxy(this.testProxy = new TestProxy());
... plus several more proxies or mediator instantiations.


Title: Re: feature request
Post by: puremvc on December 07, 2013, 11:34:32
Makes sense.