File indexing completed on 2024-12-22 05:36:20
0001 <?php 0002 0003 class HTMLPurifier_Printer_CSSDefinition extends HTMLPurifier_Printer 0004 { 0005 /** 0006 * @type HTMLPurifier_CSSDefinition 0007 */ 0008 protected $def; 0009 0010 /** 0011 * @param HTMLPurifier_Config $config 0012 * @return string 0013 */ 0014 public function render($config) 0015 { 0016 $this->def = $config->getCSSDefinition(); 0017 $ret = ''; 0018 0019 $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer')); 0020 $ret .= $this->start('table'); 0021 0022 $ret .= $this->element('caption', 'Properties ($info)'); 0023 0024 $ret .= $this->start('thead'); 0025 $ret .= $this->start('tr'); 0026 $ret .= $this->element('th', 'Property', array('class' => 'heavy')); 0027 $ret .= $this->element('th', 'Definition', array('class' => 'heavy', 'style' => 'width:auto;')); 0028 $ret .= $this->end('tr'); 0029 $ret .= $this->end('thead'); 0030 0031 ksort($this->def->info); 0032 foreach ($this->def->info as $property => $obj) { 0033 $name = $this->getClass($obj, 'AttrDef_'); 0034 $ret .= $this->row($property, $name); 0035 } 0036 0037 $ret .= $this->end('table'); 0038 $ret .= $this->end('div'); 0039 0040 return $ret; 0041 } 0042 } 0043 0044 // vim: et sw=4 sts=4