Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once(JELIX_LIB_PATH.'tpl/jTpl.class.php');
- class myLatexResponse extends jResponse {
- protected $_type = 'latex';
- public $content = null;
- public $contentTpl = '';
- function __construct() {
- $this->content = new jTpl();
- parent::__construct();
- }
- final public function output(){
- if(!empty($this->contentTpl)) {
- $this->contentTpl->assign(...);
- ...
- $latexStr = $this->content->fetch($this->contentTpl);
- }
- $this->_httpHeaders['Content-Type']='application/x-latex';
- $this->_httpHeaders['Content-length']=@filesize($texFile);
- $this->sendHttpHeaders();
- echo $latexStr;
- return true;
- }
- }
Add Comment
Please, Sign In to add comment