示例#1
0
 /**
  * Generate a XHTML header.
  *
  * @return void
  */
 public function xhtml()
 {
     $this->htmlattrs['xmlns'] = 'http://www.w3.org/1999/xhtml';
     echo '<?xml version="1.0" ?>' . "\n";
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"';
     Core\Generator::lineBreak();
     Core\Config::set('tabs', '++');
     Core\Generator::tabs();
     echo '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
     Core\Generator::lineBreak();
     Core\Config::set('tabs', '--');
     echo $this->getHtml();
     echo $this->getHead();
 }
示例#2
0
文件: HTML.php 项目: xiphe/html
 /**
  * This is where the magic happens.
  *
  * Catch all method calls to unknown methods and pass them
  * to the Generator.
  * 
  * @param string $name      the called method
  * @param array  $arguments passed arguments
  * 
  * @return mixed             Xiphe\HTML or whatever the generator returns.
  */
 public function __call($name, $arguments)
 {
     Core\Config::setHTMLInstance($this);
     $r = Core\Generator::call($name, $arguments);
     if (!empty($r)) {
         return $r;
     }
     return $this;
 }