]> andersk Git - sql-web.git/blame - lib/joe/css.lib.php
some XHTML/XML wrapper classes
[sql-web.git] / lib / joe / css.lib.php
CommitLineData
abc9b7a9
JP
1<?php
2require_once 'container.lib.php';
3
4class CSS extends Container {
5 protected function paint_head() {
6 if ($this->has_id())
7 return sprintf("%s {", $this->get_id());
8 }
9 protected function paint_attributes() {
10 $r = array();
11 foreach($this->get_attributes() as $k=>$v) {
12 //$k = strtolower($k);
13 $r[] = "$k: $v;";
14 }
15 return implode('',$r);
16 }
17 protected function paint_foot() {
18 if ($this->has_id())
19 return sprintf("};");
20 }
21 function __toString() {
22 return $this->paint_head().$this->paint_attributes().$this->paint_foot();
23 }
24}
This page took 0.280113 seconds and 5 git commands to generate.