HTMLPurifier 4.4.0
|
00001 <?php 00002 00003 class HTMLPurifier_Printer_CSSDefinition extends HTMLPurifier_Printer 00004 { 00005 00006 protected $def; 00007 00008 public function render($config) { 00009 $this->def = $config->getCSSDefinition(); 00010 $ret = ''; 00011 00012 $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer')); 00013 $ret .= $this->start('table'); 00014 00015 $ret .= $this->element('caption', 'Properties ($info)'); 00016 00017 $ret .= $this->start('thead'); 00018 $ret .= $this->start('tr'); 00019 $ret .= $this->element('th', 'Property', array('class' => 'heavy')); 00020 $ret .= $this->element('th', 'Definition', array('class' => 'heavy', 'style' => 'width:auto;')); 00021 $ret .= $this->end('tr'); 00022 $ret .= $this->end('thead'); 00023 00024 ksort($this->def->info); 00025 foreach ($this->def->info as $property => $obj) { 00026 $name = $this->getClass($obj, 'AttrDef_'); 00027 $ret .= $this->row($property, $name); 00028 } 00029 00030 $ret .= $this->end('table'); 00031 $ret .= $this->end('div'); 00032 00033 return $ret; 00034 } 00035 00036 } 00037 00038 // vim: et sw=4 sts=4