private function merge(ServerRequestInterface $request, array $data)
    {
        $existing = $request->getAttribute('viewData', []);
        return array_merge($existing, $data);
    }
private function merge(ServerRequestInterface $request, array $data)
    {
        $existing = $request->getAttribute('viewData', []);
        return array_merge($existing, $data);
    }
private function merge ( ServerRequestInterface $ request , array $ data ) { $ existing = $ request -> getAttribute ( 'viewData' , [ ] ) ; return array_merge ( $ existing , $ data ) ; }
Merges any existing view data in the request with the provided one

@param ServerRequestInterface $request
@param array                  $data

@return array
Merges any existing view data in the request with the provided one