PSR-2 reformatting PHPDoc corrections
[htmlpurifier.git] / library / HTMLPurifier / Printer / CSSDefinition.php
blob29505fe12d40f45438eaaccc13c207d5c748232c
1 <?php
3 class HTMLPurifier_Printer_CSSDefinition extends HTMLPurifier_Printer
5 /**
6 * @type HTMLPurifier_CSSDefinition
7 */
8 protected $def;
10 /**
11 * @param HTMLPurifier_Config $config
12 * @return string
14 public function render($config)
16 $this->def = $config->getCSSDefinition();
17 $ret = '';
19 $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer'));
20 $ret .= $this->start('table');
22 $ret .= $this->element('caption', 'Properties ($info)');
24 $ret .= $this->start('thead');
25 $ret .= $this->start('tr');
26 $ret .= $this->element('th', 'Property', array('class' => 'heavy'));
27 $ret .= $this->element('th', 'Definition', array('class' => 'heavy', 'style' => 'width:auto;'));
28 $ret .= $this->end('tr');
29 $ret .= $this->end('thead');
31 ksort($this->def->info);
32 foreach ($this->def->info as $property => $obj) {
33 $name = $this->getClass($obj, 'AttrDef_');
34 $ret .= $this->row($property, $name);
37 $ret .= $this->end('table');
38 $ret .= $this->end('div');
40 return $ret;
44 // vim: et sw=4 sts=4