Source for file currencyfield.php

Documentation is available at currencyfield.php

  1. <?php
  2. /**
  3. * adaptation of the textfield widget primitive to currency input
  4. *
  5. @author    Stuart Prescott
  6. @copyright  Copyright Stuart Prescott
  7. @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  8. @version    $Id: currencyfield.php,v 1.2 2006/10/23 22:26:28 themill Exp $
  9. @package    Bumblebee
  10. @subpackage FormsLibrary
  11. */
  12.  
  13. /** Load ancillary functions */
  14. require_once 'inc/typeinfo.php';
  15.  
  16. /** parent object */
  17. require_once 'textfield.php';
  18.  
  19. /**
  20. * adaptation of the textfield widget primitive to currency input
  21. *
  22. * Designed for currency numbers to be edited in a text field widget in the HTML form
  23. *
  24. @package    Bumblebee
  25. @subpackage FormsLibrary
  26. */
  27. class CurrencyField extends TextField {
  28.  
  29.   /**
  30.   *  Create a new field object, designed to be superclasses
  31.   *
  32.   * @param string $name   the name of the field (db name, and html field name
  33.   * @param string $longname  long name to be used in the label of the field in display
  34.   * @param string $description  used in the html title or longdesc for the field
  35.   */
  36.   function CurrencyField($name$longname=''$description=''$allowBlanks=true{
  37.     parent::TextField($name$longname$description);
  38.     $this->valueCleaner = 'currencyValueCleaner';
  39.     $this->isValidTest = $allowBlanks 'is_cost_amount_or_blank' 'is_cost_amount';
  40.   }
  41.  
  42. // class TextField
  43.  
  44. ?>

Documentation generated on Tue, 06 Mar 2007 10:01:10 +0000 by phpDocumentor 1.3.0