Source for file AlphaValue.php

Documentation is available at AlphaValue.php

  1. <?php
  2.  
  3. {
  4.     
  5.     public function __construct({
  6.         parent::__construct(false)// opacity is non-negative, but we will clamp it
  7.     }
  8.     
  9.     public function validate($number$config$context{
  10.         $result parent::validate($number$config$context);
  11.         if ($result === falsereturn $result;
  12.         $float = (float) $result;
  13.         if ($float 0.0$result '0';
  14.         if ($float 1.0$result '1';
  15.         return $result;
  16.     }
  17.     
  18. }

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