Source for file Boolean.php

Documentation is available at Boolean.php

  1. <?php
  2.  
  3. class PHPFIT_TypeAdapter_Boolean extends PHPFIT_TypeAdapter {
  4. public function equals($a, $b) {
  5. return $a == $b;
  6. }
  7.  
  8. public function parse($s) {
  9. if ($s == "false")
  10. return false;
  11. else
  12. if ($s == "true")
  13. return true;
  14. return "not a boolean";
  15. }
  16. }
  17.  
  18. ?>

Documentation generated on Sun, 02 Apr 2006 23:21:37 +0000 by phpDocumentor 1.3.0RC5