Changeset 757
- Timestamp:
- 01/28/08 14:18:43 (1 year ago)
- Files:
-
- trunk/lib/jelix/core/response/jResponseHtml.class.php (modified) (3 diffs)
- trunk/lib/jelix/core/response/jResponseHtml.class.php (modified) (3 diffs)
- trunk/lib/jelix/core/response/jResponseHtml.class.php (modified) (3 diffs)
- trunk/lib/jelix/core/response/jResponseXul.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseXul.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseXul.class.php (modified) (2 diffs)
- trunk/testapp/responses/myHtmlResponse.class.php (modified) (1 diff)
- trunk/testapp/responses/myHtmlResponse.class.php (modified) (1 diff)
- trunk/testapp/responses/myHtmlResponse.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix/core/response/jResponseHtml.class.php
r699 r757 152 152 153 153 $this->sendHttpHeaders(); 154 if($this->_isXhtml){ 155 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 156 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="',$this->_lang,'" lang="',$this->_lang,'"> 157 '; 158 }else{ 159 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', "\n"; 160 echo '<html lang="',$this->_lang,'">'; 161 } 154 $this->outputDoctype(); 162 155 $this->_headSent = 1; 163 $this-> _commonProcess();156 $this->doAfterActions(); 164 157 if($this->bodyTpl != '') 165 158 $this->body->meta($this->bodyTpl); … … 226 219 * The method you can overload in your inherited html response 227 220 * overload it if you want to add processes (stylesheet, head settings, additionnal content etc..) 228 * for all actions 221 * after all actions 222 * @since 1.1 223 */ 224 protected function doAfterActions(){ 225 $this->_commonProcess(); // for compatibility with jelix 1.0 226 } 227 228 /** 229 * same use as doAfterActions, but deprecated method. It is just here for compatibility with Jelix 1.0. 230 * Use doAfterActions instead 231 * @deprecated 229 232 */ 230 233 protected function _commonProcess(){ 231 232 234 } 233 235 … … 370 372 final public function addMetaDescription ($content){ 371 373 $this->_MetaDescription[] = $content; 374 } 375 376 /** 377 * generate the doctype. You can override it if you want to have your own doctype, like XHTML+MATHML. 378 */ 379 protected function outputDoctype (){ 380 if($this->_isXhtml){ 381 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 382 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="',$this->_lang,'" lang="',$this->_lang,'"> 383 '; 384 }else{ 385 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', "\n"; 386 echo '<html lang="',$this->_lang,'">'; 387 } 372 388 } 373 389 trunk/lib/jelix/core/response/jResponseHtml.class.php
r699 r757 152 152 153 153 $this->sendHttpHeaders(); 154 if($this->_isXhtml){ 155 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 156 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="',$this->_lang,'" lang="',$this->_lang,'"> 157 '; 158 }else{ 159 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', "\n"; 160 echo '<html lang="',$this->_lang,'">'; 161 } 154 $this->outputDoctype(); 162 155 $this->_headSent = 1; 163 $this-> _commonProcess();156 $this->doAfterActions(); 164 157 if($this->bodyTpl != '') 165 158 $this->body->meta($this->bodyTpl); … … 226 219 * The method you can overload in your inherited html response 227 220 * overload it if you want to add processes (stylesheet, head settings, additionnal content etc..) 228 * for all actions 221 * after all actions 222 * @since 1.1 223 */ 224 protected function doAfterActions(){ 225 $this->_commonProcess(); // for compatibility with jelix 1.0 226 } 227 228 /** 229 * same use as doAfterActions, but deprecated method. It is just here for compatibility with Jelix 1.0. 230 * Use doAfterActions instead 231 * @deprecated 229 232 */ 230 233 protected function _commonProcess(){ 231 232 234 } 233 235 … … 370 372 final public function addMetaDescription ($content){ 371 373 $this->_MetaDescription[] = $content; 374 } 375 376 /** 377 * generate the doctype. You can override it if you want to have your own doctype, like XHTML+MATHML. 378 */ 379 protected function outputDoctype (){ 380 if($this->_isXhtml){ 381 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 382 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="',$this->_lang,'" lang="',$this->_lang,'"> 383 '; 384 }else{ 385 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', "\n"; 386 echo '<html lang="',$this->_lang,'">'; 387 } 372 388 } 373 389 trunk/lib/jelix/core/response/jResponseHtml.class.php
r699 r757 152 152 153 153 $this->sendHttpHeaders(); 154 if($this->_isXhtml){ 155 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 156 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="',$this->_lang,'" lang="',$this->_lang,'"> 157 '; 158 }else{ 159 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', "\n"; 160 echo '<html lang="',$this->_lang,'">'; 161 } 154 $this->outputDoctype(); 162 155 $this->_headSent = 1; 163 $this-> _commonProcess();156 $this->doAfterActions(); 164 157 if($this->bodyTpl != '') 165 158 $this->body->meta($this->bodyTpl); … … 226 219 * The method you can overload in your inherited html response 227 220 * overload it if you want to add processes (stylesheet, head settings, additionnal content etc..) 228 * for all actions 221 * after all actions 222 * @since 1.1 223 */ 224 protected function doAfterActions(){ 225 $this->_commonProcess(); // for compatibility with jelix 1.0 226 } 227 228 /** 229 * same use as doAfterActions, but deprecated method. It is just here for compatibility with Jelix 1.0. 230 * Use doAfterActions instead 231 * @deprecated 229 232 */ 230 233 protected function _commonProcess(){ 231 232 234 } 233 235 … … 370 372 final public function addMetaDescription ($content){ 371 373 $this->_MetaDescription[] = $content; 374 } 375 376 /** 377 * generate the doctype. You can override it if you want to have your own doctype, like XHTML+MATHML. 378 */ 379 protected function outputDoctype (){ 380 if($this->_isXhtml){ 381 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 382 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="',$this->_lang,'" lang="',$this->_lang,'"> 383 '; 384 }else{ 385 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', "\n"; 386 echo '<html lang="',$this->_lang,'">'; 387 } 372 388 } 373 389 trunk/lib/jelix/core/response/jResponseXul.class.php
r705 r757 105 105 $this->_httpHeaders['Content-Type']='application/vnd.mozilla.xul+xml;charset='.$GLOBALS['gJConfig']->charset; 106 106 $this->sendHttpHeaders(); 107 $this-> _commonProcess();107 $this->doAfterActions(); 108 108 if($this->bodyTpl != '') 109 109 $this->body->meta($this->bodyTpl); … … 277 277 278 278 /** 279 * override it into your own xul response object, to do 280 * all things commons to all xul actions 279 * The method you can overload in your inherited XUL response 280 * overload it if you want to add processes (stylesheet, head settings, additionnal content etc..) 281 * after all actions 282 * @since 1.1 283 */ 284 protected function doAfterActions(){ 285 $this->_commonProcess(); // for compatibility with jelix 1.0 286 } 287 288 /** 289 * same use as doAfterActions, but deprecated method. It is just here for compatibility with Jelix 1.0. 290 * Use doAfterActions instead 291 * @deprecated 281 292 */ 282 293 protected function _commonProcess(){ 283 284 294 } 285 295 trunk/lib/jelix/core/response/jResponseXul.class.php
r705 r757 105 105 $this->_httpHeaders['Content-Type']='application/vnd.mozilla.xul+xml;charset='.$GLOBALS['gJConfig']->charset; 106 106 $this->sendHttpHeaders(); 107 $this-> _commonProcess();107 $this->doAfterActions(); 108 108 if($this->bodyTpl != '') 109 109 $this->body->meta($this->bodyTpl); … … 277 277 278 278 /** 279 * override it into your own xul response object, to do 280 * all things commons to all xul actions 279 * The method you can overload in your inherited XUL response 280 * overload it if you want to add processes (stylesheet, head settings, additionnal content etc..) 281 * after all actions 282 * @since 1.1 283 */ 284 protected function doAfterActions(){ 285 $this->_commonProcess(); // for compatibility with jelix 1.0 286 } 287 288 /** 289 * same use as doAfterActions, but deprecated method. It is just here for compatibility with Jelix 1.0. 290 * Use doAfterActions instead 291 * @deprecated 281 292 */ 282 293 protected function _commonProcess(){ 283 284 294 } 285 295 trunk/lib/jelix/core/response/jResponseXul.class.php
r705 r757 105 105 $this->_httpHeaders['Content-Type']='application/vnd.mozilla.xul+xml;charset='.$GLOBALS['gJConfig']->charset; 106 106 $this->sendHttpHeaders(); 107 $this-> _commonProcess();107 $this->doAfterActions(); 108 108 if($this->bodyTpl != '') 109 109 $this->body->meta($this->bodyTpl); … … 277 277 278 278 /** 279 * override it into your own xul response object, to do 280 * all things commons to all xul actions 279 * The method you can overload in your inherited XUL response 280 * overload it if you want to add processes (stylesheet, head settings, additionnal content etc..) 281 * after all actions 282 * @since 1.1 283 */ 284 protected function doAfterActions(){ 285 $this->_commonProcess(); // for compatibility with jelix 1.0 286 } 287 288 /** 289 * same use as doAfterActions, but deprecated method. It is just here for compatibility with Jelix 1.0. 290 * Use doAfterActions instead 291 * @deprecated 281 292 */ 282 293 protected function _commonProcess(){ 283 284 294 } 285 295 trunk/testapp/responses/myHtmlResponse.class.php
r705 r757 19 19 20 20 // modifications communes aux actions utilisant cette reponses 21 protected function _commonProcess(){21 protected function doAfterActions(){ 22 22 $this->title .= ($this->title !=''?' - ':'').' Test App'; 23 23 trunk/testapp/responses/myHtmlResponse.class.php
r705 r757 19 19 20 20 // modifications communes aux actions utilisant cette reponses 21 protected function _commonProcess(){21 protected function doAfterActions(){ 22 22 $this->title .= ($this->title !=''?' - ':'').' Test App'; 23 23 trunk/testapp/responses/myHtmlResponse.class.php
r705 r757 19 19 20 20 // modifications communes aux actions utilisant cette reponses 21 protected function _commonProcess(){21 protected function doAfterActions(){ 22 22 $this->title .= ($this->title !=''?' - ':'').' Test App'; 23 23
