On 7 February 2014 02:20, mont0165 <[email protected]> wrote: > I have a three-tier system. > tier 1 = UI > tier 2 = 'aggregation layer' ZF2 > tier 3 = 'core services' ZF2 > > The agg layer is a way to fold in client specific 'stuff' without polluting > core services. > > In many cases, the agg layer will NOT be adding additional features, so it > simply passes everything along to core services and then passes the > response > of the core services up to the UI tier. > > I have a lot of bloat code that takes what the ui posts and passes it to > core. I want to avoid this if I can and have the request go right to core. > > Question: > Rather than coding a Controller that passes the same request on to core > services and then passes core service's response back to the UI, is there a > way either through Bootstrap or my routing config to pass certain url > patterns directly to core? > > So when UI posts to 'http://myclient.mydomain.com/member/add, zend reviews > the url pattern, sees that the agg layer doesn't have any additional client > specific tasks to execute and posts the same request to > core.mydomain.com/member/add > > Thanks in advanced! > > Monty >
Zend\Http\Client is in fact a Zend\Stdlib\DispatchableInterface instance, therefore you should be able to simply define a controller being a pre-configured Zend\Http\Client instance. That should do the trick. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/
