function deploy($xml) { $Page = new Page(); $blcks = $xml->blocks->block; $locals = (array) $xml->vars; $locals['catalogue'] = $Page->catalogue(); $locals['blocks'] = $Page->render_blocks($blcks, $locals); $locals['modals'] = $Page->render('modals', $locals); $content = $Page->render('layout', $locals); file_put_contents(ROOTPATH . '/app/data/result.html', $content); }