Exemplo n.º 1
0
 function outputStylesheet(CSSStylesheet $t)
 {
     $out = '';
     foreach ($t->getObjects() as $o) {
         assert('$o instanceof CSSObject');
         switch (get_class($o)) {
             case 'CSSImport':
                 $out .= $this->outputImport($o);
                 break;
             case 'CSSRuleset':
                 $out .= $this->outputRuleset($o);
                 break;
             case 'CSSMedia':
                 $out .= $this->outputMedia($o);
                 break;
         }
     }
     return $out . "\n";
     // stupid firefox ignores first rule if CSS doesnt have newline!
 }
Exemplo n.º 2
0
 function addSheet(CSSStylesheet $s)
 {
     $this->objects = array_merge($this->objects, $s->getObjects());
     $this->addVarsArray($s->getVars());
 }