Пример #1
0
 public function addDebugOutput($response)
 {
     // build doc for debug output
     $doctype = \DOMImplementation::createDocumentType('html');
     $doc = \DOMImplementation::createDocument(null, 'include', $doctype);
     $doc->lastChild->setAttribute('type', 'debug');
     // run it through the composer
     $uiComposer = new \BaseXMS\UiComposer\UiComposer();
     $uiComposer->setServiceLocator($this->serviceManager);
     $uiComposer->setDoc($doc);
     //TODO: allow to specify the output location for the debug output
     $content = $response->getContent() . $uiComposer->run()->output();
     $response->setContent($content);
     return $this;
 }