Source for file Length.php

Documentation is available at Length.php

  1. <?php
  2.  
  3. /**
  4.  * Class for handling width/height length attribute transformations to CSS
  5.  */
  6. {
  7.     
  8.     protected $name;
  9.     protected $cssName;
  10.     
  11.     public function __construct($name$css_name null{
  12.         $this->name = $name;
  13.         $this->cssName = $css_name $css_name $name;
  14.     }
  15.     
  16.     public function transform($attr$config$context{
  17.         if (!isset($attr[$this->name])) return $attr;
  18.         $length $this->confiscateAttr($attr$this->name);
  19.         if(ctype_digit($length)) $length .= 'px';
  20.         $this->prependCSS($attr$this->cssName . ":$length;");
  21.         return $attr;
  22.     }
  23.     
  24. }

Documentation generated on Thu, 19 Jun 2008 18:49:42 -0400 by phpDocumentor 1.4.2