Changeset 1346 in subversion
- Timestamp:
- Apr 30, 2008 9:24:45 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_html_page.php
r1291 r1346 1 1 <?php 2 3 2 /* 4 3 +-----------------------------------------------------------------------+ … … 24 23 * 25 24 * @package HTML 25 * 26 * @author Thomas Bruederli <roundcube@gmail.com> 27 * @license http://gnu.org GPL 28 * @todo See about improving performance (__get, __set, sprintf) 26 29 */ 27 30 class rcube_html_page 28 31 { 29 protected $scripts_path = ''; 30 protected $script_files = array(); 31 protected $external_scripts = array(); 32 protected $scripts = array(); 33 protected $charset = 'UTF-8'; 34 35 protected $script_tag_file = "<script type=\"text/javascript\" src=\"%s%s\"></script>\n"; 36 protected $script_tag = "<script type=\"text/javascript\">\n<!--\n%s\n\n//-->\n</script>\n"; 37 protected $default_template = "<html>\n<head><title></title></head>\n<body></body>\n</html>"; 38 protected $tag_format_external_script = "<script type=\"text/javascript\" src=\"%s\"></script>\n"; 39 40 protected $title = ''; 41 protected $header = ''; 42 protected $footer = ''; 43 protected $body = ''; 44 45 46 /** Constructor */ 47 public function __construct() {} 32 protected $_store = array(); 33 34 /** 35 * Constructor 36 * 37 * @return rcube_html_page 38 * @uses self::reset() 39 */ 40 public function __construct() 41 { 42 $this->reset(); 43 } 48 44 49 45 /** … … 125 121 /** 126 122 * Reset all saved properties 123 * 124 * @return void 125 * @see self::__construct 126 * @uses self::$_store 127 127 */ 128 128 public function reset() 129 129 { 130 $this->scripts_path = ''; 130 131 $this->script_files = array(); 132 $this->external_scripts = array(); 131 133 $this->scripts = array(); 134 $this->charset = 'UTF-8'; 135 136 // templates 137 $this->script_tag_file = "<script type=\"text/javascript\" src=\"%s%s\"></script>\n"; 138 $this->script_tag = "<script type=\"text/javascript\">\n<!--\n%s\n\n//-->\n</script>\n"; 139 $this->default_template = "<html>\n<head><title></title></head>\n<body></body>\n</html>"; 140 $this->tag_format_external_script = "<script type=\"text/javascript\" src=\"%s\"></script>\n"; 141 142 // page stuff 132 143 $this->title = ''; 133 144 $this->header = ''; 134 145 $this->footer = ''; 146 $this->body = ''; 135 147 } 136 148 … … 251 263 $output = str_replace('$__skin_path', $base_path, $output); 252 264 253 print rcube_charset_convert($output, 'UTF-8', $this->charset); 265 echo rcube_charset_convert($output, 'UTF-8', $this->charset); 266 } 267 268 /** 269 * __get 270 * 271 * @param string $var A variable name. 272 * 273 * @return mixed 274 * @uses self::$_store 275 */ 276 public function __get($var) 277 { 278 return $this->_store[$var]; 279 } 280 281 /** 282 * __set 283 * 284 * @param string $var A variable name. 285 * @param mixed $value The value of the variable. 286 * 287 * @return mixed 288 * @uses self::$_store 289 */ 290 public function __set($var, $value) 291 { 292 return $this->_store[$var] = $value; 254 293 } 255 294 } 256
Note: See TracChangeset
for help on using the changeset viewer.
