/**
  * Constructor
  *
  * Add HTML context
  *
  * @return void
  */
 public function __construct()
 {
     try {
         $this->_extRequest = Zend_Registry::get(Conjoon_Keys::EXT_REQUEST_OBJECT);
     } catch (Zend_Exception $e) {
         $this->_extRequest = null;
     }
     parent::__construct();
     $this->addContext('iphone', array('suffix' => 'iphone'));
     // this context will json enocde the view variables, but send the generated
     // string as text/html instead of application/json
     $this->addContext('jsonHtml', array('suffix' => 'jsonHtml', 'headers' => array('Content-Type' => 'text/html'), 'callbacks' => array('init' => 'initJsonContext', 'post' => 'postJsonContext')));
 }
Example #2
0
 /**
  * Constructor
  *
  * Add HTML context
  * 
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->addContext('html', array('suffix' => 'ajax'));
 }
 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->addContext('rss', array('suffix' => 'rss', 'headers' => array('Content-Type' => 'application/xml'), 'callbacks' => array('init' => 'initRssContext', 'post' => 'postRssContext')));
     $this->addContext('ajax', array());
 }