示例#1
0
 /**
  * @param string $title document's title. Default: "(untitled)"
  * @param string $doctype DOCTYPE code (see <code>$this->set_doctype()</code>). Default: "xhtml-t". 
  * @param string $encoding encoding used in the current document. Default: utf-8
  */
 public function __construct($title = "(untitled)", $doctype = "xhtml-t", $encoding = "utf-8")
 {
     parent::__construct();
     $this->htdoc = $this;
     $this->set('title', $title);
     $this->set('encoding', $encoding);
     $this->attr = array();
     $this->set_doctype($doctype);
     $this->set('head', $this->head = new html_head($this));
     $this->set('body', new html_element('body'));
 }
示例#2
0
 public function __construct($tpl_name = null)
 {
     if (func_num_args() > 1) {
         $args = func_get_args();
         array_shift($args);
         parent::__construct($args);
     } else {
         parent::__construct();
     }
     if (!empty($tpl_name)) {
         $this->load_template($tpl_name);
     }
 }
示例#3
0
 public function __construct($zone)
 {
     global $phpAds_context;
     parent::__construct();
     $this->zone = $zone;
     $phpAds_raw = view_local('', $this->zone, 0, 0, '', '', '0', $phpAds_context, '');
     if (!empty($phpAds_raw['html'])) {
         $phpAds_context[] = array('!=' => 'bannerid:' . $phpAds_raw['bannerid']);
         $html = $phpAds_raw['html'];
         $this->add(iconv('utf-8', 'windows-1255', $html));
     } else {
         $this->active = false;
     }
 }
示例#4
0
 public function __construct($tag, $attr = null)
 {
     $this->tag = $tag;
     if (in_array(strtolower($tag), self::$force_no_self_close)) {
         $this->self_closing = false;
     }
     if (is_array($attr)) {
         $this->attr = $attr;
     }
     if (func_num_args() > 2) {
         $args = func_get_args();
         array_shift($args);
         array_shift($args);
         parent::__construct($args);
     } else {
         parent::__construct();
     }
 }