Skip to content

Instantly share code, notes, and snippets.

@davidreuss
Created March 2, 2010 09:25
Show Gist options
  • Save davidreuss/319379 to your computer and use it in GitHub Desktop.
Save davidreuss/319379 to your computer and use it in GitHub Desktop.
<?php
class FooController extends Zend_Controller_Action {
public function init() {
$ctx = $this->_helper->getHelper('AjaxContext');
$ctx->addActionContext('render', 'html')
->initContext();
}
public function renderAction() {
if ($this->_request->isXmlHttpRequest()) {
echo 'WHAT?';
return;
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment