For a part of my network with 4 similar websites (same code, but different layouts) I would like to create one application with 'Zend Framework 2' to control these 4 websites in one app. This application should take a look which domain is requested and render the right main layout and view layout for the requested website.
My thoughts about this is to write a plugin who set a variable for layout/view at the time when bootstrap is executed.
Is this right or is it better to do this in another way?