Source for file Valid.class.php

Documentation is available at Valid.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 Valid
  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.  * Validation Interface
  22.  * 
  23.  * The methods defined in the interface only apply to handling Exceptions.  The
  24.  * first will define if Exceptions should be thrown during a validation method
  25.  * call.  The second will define the Error Level for any Exceptions thrown by
  26.  * the Validation method.  All Gumbo_Exceptions default to ERROR_DEBUG.  This
  27.  * simply changes that level to another value.
  28.  *
  29.  * @category Gumbo
  30.  * @package Valid
  31.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  32.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  33.  * @author Michael Luster <mluster79@yahoo.com>
  34.  * @link http://sourceforge.net/projects/phpgumbo
  35.  * @desc Validation Interface
  36.  * @version 0.0.1
  37.  */
  38.  
  39. interface Gumbo_Interface_Valid {
  40.     
  41.     /** MUTATOR METHODS **/
  42.     /**
  43.      * Sets if the class should throw Exceptions
  44.      * @param bool $yes 
  45.      */
  46.     public function setThrow ($yes);
  47.     
  48.     /**
  49.      * Sets the Error Level
  50.      * @param int $level 
  51.      */
  52.     public function setLevel ($level);
  53.     
  54.     
  55.     
  56.     /** ACCESSOR METHODS **/
  57.     /**
  58.      * Returns if Exceptions should be thrown from this class
  59.      * @return bool 
  60.      */
  61.     public function isThrowing ();
  62.     
  63.     /**
  64.      * Returns the Error Level for Exceptions thrown by the class
  65.      * @return int 
  66.      */
  67.     public function getLevel ();
  68.     
  69. }
  70.  
  71. ?>