Source for file BgColor.php

Documentation is available at BgColor.php

  1. <?php
  2.  
  3. /**
  4.  * Pre-transform that changes deprecated bgcolor attribute to CSS.
  5.  */
  6.  
  7.     public function transform($attr$config$context{
  8.         
  9.         if (!isset($attr['bgcolor'])) return $attr;
  10.         
  11.         $bgcolor $this->confiscateAttr($attr'bgcolor');
  12.         // some validation should happen here
  13.         
  14.         $this->prependCSS($attr"background-color:$bgcolor;");
  15.         
  16.         return $attr;
  17.         
  18.     }
  19.     
  20. }

Documentation generated on Thu, 19 Jun 2008 18:48:53 -0400 by phpDocumentor 1.4.2