Yes, in the controller you can turn off the view visualization as follows:
$this->getHelper('viewRenderer')->setNoRender();
And you add whatever you like to the weekend:
$this->getResponse()->setBody('Hello Moak!');
There are other things you can do with the Response object:
$r = $this->getResponse();
$r->setHeader('Content-type', 'text/html', true);
$r->setRawHeader('HTTP/1.1 200 OK');
$r->setHttpResponseCode(200);
$r->clearBody();
$r->setBody('<html><h1>Hello</h1></hello>');
source
share