2006-11-24 06:26:02 +00:00
|
|
|
<?php
|
|
|
|
|
2006-11-25 05:05:32 +00:00
|
|
|
class HTMLPurifier_Printer_CSSDefinition extends HTMLPurifier_Printer
|
2006-11-24 06:26:02 +00:00
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-11-25 02:24:39 +00:00
|
|
|
protected $def;
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-11-25 02:24:39 +00:00
|
|
|
public function render($config) {
|
2006-11-25 05:05:32 +00:00
|
|
|
$this->def = $config->getCSSDefinition();
|
|
|
|
$ret = '';
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-11-25 05:05:32 +00:00
|
|
|
$ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer'));
|
|
|
|
$ret .= $this->start('table');
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-11-25 05:05:32 +00:00
|
|
|
$ret .= $this->element('caption', 'Properties ($info)');
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-11-25 05:05:32 +00:00
|
|
|
$ret .= $this->start('thead');
|
|
|
|
$ret .= $this->start('tr');
|
|
|
|
$ret .= $this->element('th', 'Property', array('class' => 'heavy'));
|
|
|
|
$ret .= $this->element('th', 'Definition', array('class' => 'heavy', 'style' => 'width:auto;'));
|
|
|
|
$ret .= $this->end('tr');
|
|
|
|
$ret .= $this->end('thead');
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-11-25 05:05:32 +00:00
|
|
|
ksort($this->def->info);
|
|
|
|
foreach ($this->def->info as $property => $obj) {
|
|
|
|
$name = $this->getClass($obj, 'AttrDef_');
|
|
|
|
$ret .= $this->row($property, $name);
|
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-11-25 05:05:32 +00:00
|
|
|
$ret .= $this->end('table');
|
|
|
|
$ret .= $this->end('div');
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-11-25 05:05:32 +00:00
|
|
|
return $ret;
|
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-11-24 06:26:02 +00:00
|
|
|
}
|
|
|
|
|