Source for file Digit.class.php

Documentation is available at Digit.class.php

  1. <?php
  2. /**
  3.  * Gumbo Library Framework
  4.  *
  5.  * LICENSE
  6.  * This library is being released under the terms of the New BSD License.  A
  7.  * copy of the license is packaged with the software (LICENSE.txt).  If no
  8.  * copy is found, a copy of the license template can be found at:
  9.  * http://www.opensource.org/licenses/bsd-license.php
  10.  * 
  11.  * @category Gumbo
  12.  * @package Filter
  13.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  14.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  15.  * @author Michael Luster <mluster79@yahoo.com>
  16.  * @link http://sourceforge.net/projects/phpgumbo
  17.  * @version 0.0.1
  18.  */
  19.  
  20. /**
  21.  * Digit Filter Class, removes all non-digit characters
  22.  *
  23.  * @category Gumbo
  24.  * @package Filter
  25.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  26.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  27.  * @author Michael Luster <mluster79@yahoo.com>
  28.  * @link http://sourceforge.net/projects/phpgumbo
  29.  * @desc Digit Filter Class, removes all non-digit characters
  30.  * @version 0.0.1
  31.  */
  32.  
  33. gumbo_load ("Filter_Preg");
  34.  
  35.     
  36.     /**
  37.      * Constructor
  38.      * @param string $char replacement character
  39.      * @param int $limit 
  40.      */
  41.     public function __construct ($char=null$limit=null{
  42.         parent::__construct ("[^0-9]"$char$limit);
  43.     }
  44.     
  45. }
  46.  
  47. ?>