Development

Changeset 7902

You must first sign up to be able to contribute.

Changeset 7902

Show
Ignore:
Timestamp:
03/15/08 14:17:33 (5 years ago)
Author:
fabien
Message:

rename sfValidatorBase to sfValidator in sfCompat10Plugin and renamed the new sfValidator class to sfValidatorBase (closes #3103)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/UPGRADE

    r7790 r7902  
    351351  * `->moveFile()` 
    352352 
    353 sfValidator class 
    354 ----------------- 
    355  
    356 If you use the symfony 1.0 interface for validation, your custom validators must 
    357 now extend the `sfValidatorBase` class. 
    358  
    359353`->initialize()` methods 
    360354------------------------ 
  • branches/1.1/lib/autoload/sfCoreAutoload.class.php

    r7892 r7902  
    358358  'sfValidatorI18nChoiceCountry' => 'validator/i18n', 
    359359  'sfValidatorI18nChoiceLanguage' => 'validator/i18n', 
    360   'sfValidator' => 'validator', 
    361360  'sfValidatorAnd' => 'validator', 
     361  'sfValidatorBase' => 'validator', 
    362362  'sfValidatorBoolean' => 'validator', 
    363363  'sfValidatorCallback' => 'validator', 
  • branches/1.1/lib/plugins/sfCompat10Plugin/lib/validator/sfCallbackValidator.class.php

    r5384 r7902  
    2929 * @version    SVN: $Id$ 
    3030 */ 
    31 class sfCallbackValidator extends sfValidatorBase 
     31class sfCallbackValidator extends sfValidator 
    3232{ 
    3333  /** 
  • branches/1.1/lib/plugins/sfCompat10Plugin/lib/validator/sfCompareValidator.class.php

    r5384 r7902  
    3535 * @version    SVN: $Id$ 
    3636 */ 
    37 class sfCompareValidator extends sfValidatorBase 
     37class sfCompareValidator extends sfValidator 
    3838{ 
    3939  /** 
  • branches/1.1/lib/plugins/sfCompat10Plugin/lib/validator/sfDateValidator.class.php

    r7792 r7902  
    2020 * @version    SVN: $Id$ 
    2121 */ 
    22 class sfDateValidator extends sfValidatorBase 
     22class sfDateValidator extends sfValidator 
    2323{ 
    2424  /** 
  • branches/1.1/lib/plugins/sfCompat10Plugin/lib/validator/sfEmailValidator.class.php

    r7792 r7902  
    2020 * @version    SVN: $Id$ 
    2121 */ 
    22 class sfEmailValidator extends sfValidatorBase 
     22class sfEmailValidator extends sfValidator 
    2323{ 
    2424  /** 
  • branches/1.1/lib/plugins/sfCompat10Plugin/lib/validator/sfFileValidator.class.php

    r5384 r7902  
    2828 * @version    SVN: $Id$ 
    2929 */ 
    30 class sfFileValidator extends sfValidatorBase 
     30class sfFileValidator extends sfValidator 
    3131{ 
    3232  /** 
  • branches/1.1/lib/plugins/sfCompat10Plugin/lib/validator/sfNumberValidator.class.php

    r7792 r7902  
    3434 * @version    SVN: $Id$ 
    3535 */ 
    36 class sfNumberValidator extends sfValidatorBase 
     36class sfNumberValidator extends sfValidator 
    3737{ 
    3838  /** 
  • branches/1.1/lib/plugins/sfCompat10Plugin/lib/validator/sfRegexValidator.class.php

    r7792 r7902  
    3333 * @version    SVN: $Id$ 
    3434 */ 
    35 class sfRegexValidator extends sfValidatorBase 
     35class sfRegexValidator extends sfValidator 
    3636{ 
    3737  /** 
  • branches/1.1/lib/plugins/sfCompat10Plugin/lib/validator/sfStringValidator.class.php

    r7792 r7902  
    4040 * @version    SVN: $Id$ 
    4141 */ 
    42 class sfStringValidator extends sfValidatorBase 
     42class sfStringValidator extends sfValidator 
    4343{ 
    4444  /** 
  • branches/1.1/lib/plugins/sfCompat10Plugin/lib/validator/sfUrlValidator.class.php

    r5384 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfUrlValidator extends sfValidatorBase 
     19class sfUrlValidator extends sfValidator 
    2020{ 
    2121  /** 
  • branches/1.1/lib/plugins/sfCompat10Plugin/lib/validator/sfValidator.class.php

    r7792 r7902  
    1919 * @version    SVN: $Id$ 
    2020 */ 
    21 abstract class sfValidatorBase 
     21abstract class sfValidator 
    2222{ 
    2323  protected 
  • branches/1.1/lib/plugins/sfCompat10Plugin/test/unit/validator/sfValidatorTest.php

    r5384 r7902  
    1414$t = new lime_test(11, new lime_output_color()); 
    1515 
    16 class myValidator extends sfValidatorBase 
     16class myValidator extends sfValidator 
    1717{ 
    1818  function execute (&$value, &$error) {} 
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/validator/sfValidatorPropelChoice.class.php

    r7149 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorPropelChoice extends sfValidator 
     19class sfValidatorPropelChoice extends sfValidatorBase 
    2020{ 
    2121  /** 
     
    3030   *  * connection: The Propel connection to use (null by default) 
    3131   * 
    32    * @see sfValidator 
     32   * @see sfValidatorBase 
    3333   */ 
    3434  protected function configure($options = array(), $messages = array()) 
     
    4141 
    4242  /** 
    43    * @see sfValidator 
     43   * @see sfValidatorBase 
    4444   */ 
    4545  protected function doClean($value) 
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/validator/sfValidatorPropelChoiceMany.class.php

    r7147 r7902  
    2020{ 
    2121  /** 
    22    * @see sfValidator 
     22   * @see sfValidatorBase 
    2323   */ 
    2424  protected function doClean($values) 
  • branches/1.1/lib/validator/sfValidatorAnd.class.php

    r6951 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorAnd extends sfValidator 
     19class sfValidatorAnd extends sfValidatorBase 
    2020{ 
    2121  protected 
     
    2828   * 
    2929   *  * null 
    30    *  * a sfValidator instance 
    31    *  * an array of sfValidator instances 
     30   *  * a sfValidatorBase instance 
     31   *  * an array of sfValidatorBase instances 
    3232   * 
    3333   * @param mixed Initial validators 
     
    3535   * @param array An array of error messages 
    3636   * 
    37    * @see sfValidator 
     37   * @see sfValidatorBase 
    3838   */ 
    3939  public function __construct($validators = null, $options = array(), $messages = array()) 
    4040  { 
    41     if ($validators instanceof sfValidator
     41    if ($validators instanceof sfValidatorBase
    4242    { 
    4343      $this->addValidator($validators); 
     
    5252    else if (!is_null($validators)) 
    5353    { 
    54       throw new InvalidArgumentException('sfValidatorAnd constructor takes a sfValidator object, or a sfValidator array.'); 
     54      throw new InvalidArgumentException('sfValidatorAnd constructor takes a sfValidatorBase object, or a sfValidatorBase array.'); 
    5555    } 
    5656 
     
    5959 
    6060  /** 
    61    * @see sfValidator 
     61   * @see sfValidatorBase 
    6262   */ 
    6363  protected function configure($options = array(), $messages = array()) 
     
    6969   * Adds a validator. 
    7070   * 
    71    * @param sfValidator A sfValidator instance 
     71   * @param sfValidatorBase A sfValidatorBase instance 
    7272   */ 
    73   public function addValidator(sfValidator $validator) 
     73  public function addValidator(sfValidatorBase $validator) 
    7474  { 
    7575    $this->validators[] = $validator; 
     
    7979   * Returns an array of the validators. 
    8080   * 
    81    * @return array An array of sfValidator instances 
     81   * @return array An array of sfValidatorBase instances 
    8282   */ 
    8383  public function getValidators() 
     
    8787 
    8888  /** 
    89    * @see sfValidator 
     89   * @see sfValidatorBase 
    9090   */ 
    9191  protected function doClean($value) 
     
    119119 
    120120  /** 
    121    * @see sfValidator 
     121   * @see sfValidatorBase 
    122122   */ 
    123123  public function asString($indent = 0) 
  • branches/1.1/lib/validator/sfValidatorBase.class.php

    r6942 r7902  
    1010 
    1111/** 
    12  * sfValidator is the base class for all validators. 
     12 * sfValidatorBase is the base class for all validators. 
    1313 * 
    1414 * It also implements the required option for all validators. 
     
    1919 * @version    SVN: $Id$ 
    2020 */ 
    21 abstract class sfValidator 
     21abstract class sfValidatorBase 
    2222{ 
    2323  protected static 
     
    8686   * during validator creation. 
    8787   * 
    88    * If some options and messages are given in the sfValidator constructor 
     88   * If some options and messages are given in the sfValidatorBase constructor 
    8989   * they will take precedence over the options and messages you configure 
    9090   * in this method. 
  • branches/1.1/lib/validator/sfValidatorBoolean.class.php

    r5882 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorBoolean extends sfValidator 
     19class sfValidatorBoolean extends sfValidatorBase 
    2020{ 
    2121  /** 
     
    2727   *  * false_values: The list of false values 
    2828   * 
    29    * @see sfValidator 
     29   * @see sfValidatorBase 
    3030   */ 
    3131  protected function configure($options = array(), $messages = array()) 
     
    3838 
    3939  /** 
    40    * @see sfValidator 
     40   * @see sfValidatorBase 
    4141   */ 
    4242  protected function doClean($value) 
  • branches/1.1/lib/validator/sfValidatorCSRFToken.class.php

    r6022 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorCSRFToken extends sfValidator 
     19class sfValidatorCSRFToken extends sfValidatorBase 
    2020{ 
    2121  /** 
    22    * @see sfValidator 
     22   * @see sfValidatorBase 
    2323   */ 
    2424  protected function configure($options = array(), $messages = array()) 
     
    3232 
    3333  /** 
    34    * @see sfValidator 
     34   * @see sfValidatorBase 
    3535   */ 
    3636  protected function doClean($value) 
  • branches/1.1/lib/validator/sfValidatorCallback.class.php

    r6968 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorCallback extends sfValidator 
     19class sfValidatorCallback extends sfValidatorBase 
    2020{ 
    2121  /** 
     
    2727   *  * arguments: An array of arguments to pass to the callback 
    2828   * 
    29    * @see sfValidator 
     29   * @see sfValidatorBase 
    3030   */ 
    3131  protected function configure($options = array(), $messages = array()) 
     
    3838 
    3939  /** 
    40    * @see sfValidator 
     40   * @see sfValidatorBase 
    4141   */ 
    4242  protected function doClean($value) 
  • branches/1.1/lib/validator/sfValidatorChoice.class.php

    r5819 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorChoice extends sfValidator 
     19class sfValidatorChoice extends sfValidatorBase 
    2020{ 
    2121  /** 
     
    2626   *  * choices: An array of expected values (required) 
    2727   * 
    28    * @see sfValidator 
     28   * @see sfValidatorBase 
    2929   */ 
    3030  protected function configure($options = array(), $messages = array()) 
     
    3434 
    3535  /** 
    36    * @see sfValidator 
     36   * @see sfValidatorBase 
    3737   */ 
    3838  protected function doClean($value) 
  • branches/1.1/lib/validator/sfValidatorChoiceMany.class.php

    r5838 r7902  
    2020{ 
    2121  /** 
    22    * @see sfValidator 
     22   * @see sfValidatorBase 
    2323   */ 
    2424  protected function doClean($values) 
  • branches/1.1/lib/validator/sfValidatorDate.class.php

    r7437 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorDate extends sfValidator 
     19class sfValidatorDate extends sfValidatorBase 
    2020{ 
    2121  /** 
     
    3434   *  * bad_format 
    3535   * 
    36    * @see sfValidator 
     36   * @see sfValidatorBase 
    3737   */ 
    3838  protected function configure($options = array(), $messages = array()) 
     
    4848 
    4949  /** 
    50    * @see sfValidator 
     50   * @see sfValidatorBase 
    5151   */ 
    5252  protected function doClean($value) 
     
    166166 
    167167  /** 
    168    * @see sfValidator 
     168   * @see sfValidatorBase 
    169169   */ 
    170170  protected function isEmpty($value) 
  • branches/1.1/lib/validator/sfValidatorDecorator.class.php

    r6196 r7902  
    2121 * @version    SVN: $Id$ 
    2222 */ 
    23 abstract class sfValidatorDecorator extends sfValidator 
     23abstract class sfValidatorDecorator extends sfValidatorBase 
    2424{ 
    2525  protected 
     
    2727 
    2828  /** 
    29    * @see sfValidator 
     29   * @see sfValidatorBase 
    3030   */ 
    3131  public function __construct($options = array(), $messages = array()) 
     
    3333    $this->validator = $this->getValidator(); 
    3434 
    35     if (!$this->validator instanceof sfValidator
     35    if (!$this->validator instanceof sfValidatorBase
    3636    { 
    37       throw new RuntimeException('The getValidator() method must return a sfValidator instance.'); 
     37      throw new RuntimeException('The getValidator() method must return a sfValidatorBase instance.'); 
    3838    } 
    3939 
     
    5454   * Every subclass must implement this method. 
    5555   * 
    56    * @return sfValidator A sfValidator instance 
     56   * @return sfValidatorBase A sfValidatorBase instance 
    5757   */ 
    5858  abstract protected function getValidator(); 
    5959 
    6060  /** 
    61    * @see sfValidator 
     61   * @see sfValidatorBase 
    6262   */ 
    6363  public function clean($value) 
     
    6767 
    6868  /** 
    69    * @see sfValidator 
     69   * @see sfValidatorBase 
    7070   */ 
    7171  protected function doClean($value) 
     
    7575 
    7676  /** 
    77    * @see sfValidator 
     77   * @see sfValidatorBase 
    7878   */ 
    7979  public function getMessage($name) 
     
    8383 
    8484  /** 
    85    * @see sfValidator 
     85   * @see sfValidatorBase 
    8686   */ 
    8787  public function setMessage($name, $value) 
     
    9191 
    9292  /** 
    93    * @see sfValidator 
     93   * @see sfValidatorBase 
    9494   */ 
    9595  public function getMessages() 
     
    9999 
    100100  /** 
    101    * @see sfValidator 
     101   * @see sfValidatorBase 
    102102   */ 
    103103  public function setMessages($values) 
     
    107107 
    108108  /** 
    109    * @see sfValidator 
     109   * @see sfValidatorBase 
    110110   */ 
    111111  public function getOption($name) 
     
    115115 
    116116  /** 
    117    * @see sfValidator 
     117   * @see sfValidatorBase 
    118118   */ 
    119119  public function setOption($name, $value) 
     
    123123 
    124124  /** 
    125    * @see sfValidator 
     125   * @see sfValidatorBase 
    126126   */ 
    127127  public function hasOption($name) 
     
    131131 
    132132  /** 
    133    * @see sfValidator 
     133   * @see sfValidatorBase 
    134134   */ 
    135135  public function getOptions() 
     
    139139 
    140140  /** 
    141    * @see sfValidator 
     141   * @see sfValidatorBase 
    142142   */ 
    143143  public function setOptions($values) 
     
    147147 
    148148  /** 
    149    * @see sfValidator 
     149   * @see sfValidatorBase 
    150150   */ 
    151151  public function asString($indent = 0) 
     
    155155 
    156156  /** 
    157    * @see sfValidator 
     157   * @see sfValidatorBase 
    158158   */ 
    159159  public function getDefaultOptions() 
     
    163163 
    164164  /** 
    165    * @see sfValidator 
     165   * @see sfValidatorBase 
    166166   */ 
    167167  public function getDefaultMessages() 
  • branches/1.1/lib/validator/sfValidatorError.class.php

    r5581 r7902  
    2626   * Constructor. 
    2727   * 
    28    * @param sfValidator A sfValidator instance 
    29    * @param string      The error code 
    30    * @param array       An array of named arguments needed to render the error message 
     28   * @param sfValidatorBase A sfValidatorBase instance 
     29   * @param string          The error code 
     30   * @param array           An array of named arguments needed to render the error message 
    3131   */ 
    32   public function __construct(sfValidator $validator, $code, $arguments = array()) 
     32  public function __construct(sfValidatorBase $validator, $code, $arguments = array()) 
    3333  { 
    3434    $this->validator = $validator; 
     
    6868   * Returns the validator that triggered this error. 
    6969   * 
    70    * @return sfValidator A sfValidator instance 
     70   * @return sfValidatorBase A sfValidatorBase instance 
    7171   */ 
    7272  public function getValidator() 
  • branches/1.1/lib/validator/sfValidatorErrorSchema.class.php

    r7044 r7902  
    2828   * Constructor. 
    2929   * 
    30    * @param sfValidator A sfValidator instance 
    31    * @param array       An array of errors 
    32    */ 
    33   public function __construct(sfValidator $validator, $errors = array()) 
     30   * @param sfValidatorBase A sfValidatorBase instance 
     31   * @param array           An array of errors 
     32   */ 
     33  public function __construct(sfValidatorBase $validator, $errors = array()) 
    3434  { 
    3535    $this->validator = $validator; 
  • branches/1.1/lib/validator/sfValidatorFile.class.php

    r6870 r7902  
    2323 * @version    SVN: $Id$ 
    2424 */ 
    25 class sfValidatorFile extends sfValidator 
     25class sfValidatorFile extends sfValidatorBase 
    2626{ 
    2727  /** 
     
    5050   *  * extension 
    5151   * 
    52    * @see sfValidator 
     52   * @see sfValidatorBase 
    5353   */ 
    5454  protected function configure($options = array(), $messages = array()) 
     
    8989   *  * size:     The file size in bytes (optional) 
    9090   * 
    91    * @see sfValidator 
     91   * @see sfValidatorBase 
    9292   */ 
    9393  protected function doClean($value) 
     
    262262 
    263263  /** 
    264    * @see sfValidator 
     264   * @see sfValidatorBase 
    265265   */ 
    266266  protected function isEmpty($value) 
  • branches/1.1/lib/validator/sfValidatorFromDescription.class.php

    r6937 r7902  
    2424 
    2525  /** 
    26    * @see sfValidator 
     26   * @see sfValidatorBase 
    2727   */ 
    2828  public function __construct($string, $options = array(), $messages = array()) 
  • branches/1.1/lib/validator/sfValidatorInteger.class.php

    r5882 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorInteger extends sfValidator 
     19class sfValidatorInteger extends sfValidatorBase 
    2020{ 
    2121  /** 
     
    3232   *  * min 
    3333   * 
    34    * @see sfValidator 
     34   * @see sfValidatorBase 
    3535   */ 
    3636  protected function configure($options = array(), $messages = array()) 
     
    4646 
    4747  /** 
    48    * @see sfValidator 
     48   * @see sfValidatorBase 
    4949   */ 
    5050  protected function doClean($value) 
  • branches/1.1/lib/validator/sfValidatorNumber.class.php

    r5882 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorNumber extends sfValidator 
     19class sfValidatorNumber extends sfValidatorBase 
    2020{ 
    2121  /** 
     
    3232   *  * min 
    3333   * 
    34    * @see sfValidator 
     34   * @see sfValidatorBase 
    3535   */ 
    3636  protected function configure($options = array(), $messages = array()) 
     
    4646 
    4747  /** 
    48    * @see sfValidator 
     48   * @see sfValidatorBase 
    4949   */ 
    5050  protected function doClean($value) 
  • branches/1.1/lib/validator/sfValidatorOr.class.php

    r6951 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorOr extends sfValidator 
     19class sfValidatorOr extends sfValidatorBase 
    2020{ 
    2121  protected 
     
    2828   * 
    2929   *  * null 
    30    *  * a sfValidator instance 
    31    *  * an array of sfValidator instances 
     30   *  * a sfValidatorBase instance 
     31   *  * an array of sfValidatorBase instances 
    3232   * 
    3333   * @param mixed Initial validators 
     
    3535   * @param array An array of error messages 
    3636   * 
    37    * @see sfValidator 
     37   * @see sfValidatorBase 
    3838   */ 
    3939  public function __construct($validators = null, $options = array(), $messages = array()) 
    4040  { 
    41     if ($validators instanceof sfValidator
     41    if ($validators instanceof sfValidatorBase
    4242    { 
    4343      $this->addValidator($validators); 
     
    5252    else if (!is_null($validators)) 
    5353    { 
    54       throw new InvalidArgumentException('sfValidatorOr constructor takes a sfValidator object, or a sfValidator array.'); 
     54      throw new InvalidArgumentException('sfValidatorOr constructor takes a sfValidatorBase object, or a sfValidatorBase array.'); 
    5555    } 
    5656 
     
    5959 
    6060  /** 
    61    * @see sfValidator 
     61   * @see sfValidatorBase 
    6262   */ 
    6363  protected function configure($options = array(), $messages = array()) 
     
    6969   * Adds a validator. 
    7070   * 
    71    * @param sfValidator A sfValidator instance 
     71   * @param sfValidatorBase A sfValidatorBase instance 
    7272   */ 
    73   public function addValidator(sfValidator $validator) 
     73  public function addValidator(sfValidatorBase $validator) 
    7474  { 
    7575    $this->validators[] = $validator; 
     
    7979   * Returns an array of the validators. 
    8080   * 
    81    * @return array An array of sfValidator instances 
     81   * @return array An array of sfValidatorBase instances 
    8282   */ 
    8383  public function getValidators() 
     
    8787 
    8888  /** 
    89    * @see sfValidator 
     89   * @see sfValidatorBase 
    9090   */ 
    9191  protected function doClean($value) 
     
    113113 
    114114  /** 
    115    * @see sfValidator 
     115   * @see sfValidatorBase 
    116116   */ 
    117117  public function asString($indent = 0) 
  • branches/1.1/lib/validator/sfValidatorPass.class.php

    r5581 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorPass extends sfValidator 
     19class sfValidatorPass extends sfValidatorBase 
    2020{ 
    2121  /** 
    22    * @see sfValidator 
     22   * @see sfValidatorBase 
    2323   */ 
    2424  public function clean($value) 
     
    2828 
    2929  /** 
    30    * @see sfValidator 
     30   * @see sfValidatorBase 
    3131   */ 
    3232  protected function doClean($value) 
  • branches/1.1/lib/validator/sfValidatorRegex.class.php

    r5816 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorRegex extends sfValidator 
     19class sfValidatorRegex extends sfValidatorBase 
    2020{ 
    2121  /** 
     
    2626   *  * pattern: A regex pattern compatible with PCRE (required) 
    2727   * 
    28    * @see sfValidator 
     28   * @see sfValidatorBase 
    2929   */ 
    3030  protected function configure($options = array(), $messages = array()) 
     
    3434 
    3535  /** 
    36    * @see sfValidator 
     36   * @see sfValidatorBase 
    3737   */ 
    3838  protected function doClean($value) 
  • branches/1.1/lib/validator/sfValidatorSchema.class.php

    r7053 r7902  
    1919 * @version    SVN: $Id$ 
    2020 */ 
    21 class sfValidatorSchema extends sfValidator implements ArrayAccess 
     21class sfValidatorSchema extends sfValidatorBase implements ArrayAccess 
    2222{ 
    2323  protected 
     
    3232   * 
    3333   *  * null 
    34    *  * an array of named sfValidator instances 
     34   *  * an array of named sfValidatorBase instances 
    3535   * 
    3636   * @param mixed Initial fields 
     
    3838   * @param array An array of error messages 
    3939   * 
    40    * @see sfValidator 
     40   * @see sfValidatorBase 
    4141   */ 
    4242  public function __construct($fields = null, $options = array(), $messages = array()) 
     
    5151    else if (!is_null($fields)) 
    5252    { 
    53       throw new InvalidArgumentException('sfValidatorSchema constructor takes an array of sfValidator objects.'); 
     53      throw new InvalidArgumentException('sfValidatorSchema constructor takes an array of sfValidatorBase objects.'); 
    5454    } 
    5555 
     
    7272   * @param array An array of error messages 
    7373   * 
    74    * @see sfValidator 
     74   * @see sfValidatorBase 
    7575   */ 
    7676  protected function configure($options = array(), $messages = array()) 
     
    8383 
    8484  /** 
    85    * @see sfValidator 
     85   * @see sfValidatorBase 
    8686   */ 
    8787  public function clean($values) 
     
    9191 
    9292  /** 
    93    * @see sfValidator 
     93   * @see sfValidatorBase 
    9494   */ 
    9595  protected function doClean($values) 
     
    241241   * Sets the pre validator. 
    242242   * 
    243    * @param sfValidator A sfValidator instance 
    244    */ 
    245   public function setPreValidator(sfValidator $validator) 
     243   * @param sfValidatorBase A sfValidatorBase instance 
     244   */ 
     245  public function setPreValidator(sfValidatorBase $validator) 
    246246  { 
    247247    $this->preValidator = clone $validator; 
     
    251251   * Returns the pre validator. 
    252252   * 
    253    * @return sfValidator A sfValidator instance 
     253   * @return sfValidatorBase A sfValidatorBase instance 
    254254   */ 
    255255  public function getPreValidator() 
     
    261261   * Sets the post validator. 
    262262   * 
    263    * @param sfValidator A sfValidator instance 
    264    */ 
    265   public function setPostValidator(sfValidator $validator) 
     263   * @param sfValidatorBase A sfValidatorBase instance 
     264   */ 
     265  public function setPostValidator(sfValidatorBase $validator) 
    266266  { 
    267267    $this->postValidator = clone $validator; 
     
    271271   * Returns the post validator. 
    272272   * 
    273    * @return sfValidator A sfValidator instance 
     273   * @return sfValidatorBase A sfValidatorBase instance 
    274274   */ 
    275275  public function getPostValidator() 
     
    295295   * @param  string   The field name 
    296296   * 
    297    * @return sfValidator The sfValidator instance associated with the given name, null if it does not exist 
     297   * @return sfValidatorBase The sfValidatorBase instance associated with the given name, null if it does not exist 
    298298   */ 
    299299  public function offsetGet($name) 
     
    305305   * Sets a field (implements the ArrayAccess interface). 
    306306   * 
    307    * @param string      The field name 
    308    * @param sfValidator A sfValidator instance 
     307   * @param string          The field name 
     308   * @param sfValidatorBase A sfValidatorBase instance 
    309309   */ 
    310310  public function offsetSet($name, $validator) 
    311311  { 
    312     if (!$validator instanceof sfValidator
    313     { 
    314       throw new InvalidArgumentException('A field must be an instance of sfValidator.'); 
     312    if (!$validator instanceof sfValidatorBase
     313    { 
     314      throw new InvalidArgumentException('A field must be an instance of sfValidatorBase.'); 
    315315    } 
    316316 
     
    331331   * Returns an array of fields. 
    332332   * 
    333    * @return sfValidator An array of sfValidator instance 
     333   * @return sfValidatorBase An array of sfValidatorBase instances 
    334334   */ 
    335335  public function getFields() 
     
    339339 
    340340  /** 
    341    * @see sfValidator 
     341   * @see sfValidatorBase 
    342342   */ 
    343343  public function asString($indent = 0) 
  • branches/1.1/lib/validator/sfValidatorSchemaCompare.class.php

    r6954 r7902  
    4848   * @param array  An array of error messages 
    4949   * 
    50    * @see sfValidator 
     50   * @see sfValidatorBase 
    5151   */ 
    5252  public function __construct($leftField, $operator, $rightField, $options = array(), $messages = array()) 
     
    6262 
    6363  /** 
    64    * @see sfValidator 
     64   * @see sfValidatorBase 
    6565   */ 
    6666  protected function doClean($values) 
     
    120120 
    121121  /** 
    122    * @see sfValidator 
     122   * @see sfValidatorBase 
    123123   */ 
    124124  public function asString($indent = 0) 
  • branches/1.1/lib/validator/sfValidatorSchemaFilter.class.php

    r6196 r7902  
    2222   * Constructor. 
    2323   * 
    24    * @param string      The field name 
    25    * @param sfValidator The validator 
    26    * @param array       An array of options 
    27    * @param array       An array of error messages 
     24   * @param string          The field name 
     25   * @param sfValidatorBase The validator 
     26   * @param array           An array of options 
     27   * @param array           An array of error messages 
    2828   * 
    29    * @see sfValidator 
     29   * @see sfValidatorBase 
    3030   */ 
    31   public function __construct($field, sfValidator $validator, $options = array(), $messages = array()) 
     31  public function __construct($field, sfValidatorBase $validator, $options = array(), $messages = array()) 
    3232  { 
    3333    $this->addOption('field', $field); 
     
    3838 
    3939  /** 
    40    * @see sfValidator 
     40   * @see sfValidatorBase 
    4141   */ 
    4242  protected function doClean($values) 
     
    6060 
    6161  /** 
    62    * @see sfValidator 
     62   * @see sfValidatorBase 
    6363   */ 
    6464  public function asString($indent = 0) 
  • branches/1.1/lib/validator/sfValidatorSchemaForEach.class.php

    r7043 r7902  
    2222   * Constructor. 
    2323   * 
    24    * @param sfValidator Initial validators 
    25    * @param integer     The number of times to replicate the validator 
    26    * @param array       An array of options 
    27    * @param array       An array of error messages 
     24   * @param sfValidatorBase Initial validator 
     25   * @param integer         The number of times to replicate the validator 
     26   * @param array           An array of options 
     27   * @param array           An array of error messages 
    2828   * 
    29    * @see sfValidator 
     29   * @see sfValidatorBase 
    3030   */ 
    31   public function __construct($validator, $count, $options = array(), $messages = array()) 
     31  public function __construct(sfValidatorBase $validator, $count, $options = array(), $messages = array()) 
    3232  { 
    3333    $fields = array(); 
     
    4141 
    4242  /** 
    43    * @see sfValidator 
     43   * @see sfValidatorBase 
    4444   */ 
    4545  public function asString($indent = 0) 
  • branches/1.1/lib/validator/sfValidatorString.class.php

    r5882 r7902  
    1717 * @version    SVN: $Id$ 
    1818 */ 
    19 class sfValidatorString extends sfValidator 
     19class sfValidatorString extends sfValidatorBase 
    2020{ 
    2121  /** 
     
    3232   *  * min_length 
    3333   * 
    34    * @see sfValidator 
     34   * @see sfValidatorBase 
    3535   */ 
    3636  protected function configure($options = array(), $messages = array()) 
     
    4646 
    4747  /** 
    48    * @see sfValidator 
     48   * @see sfValidatorBase 
    4949   */ 
    5050  protected function doClean($value) 
  • branches/1.1/test/unit/validator/sfValidatorBaseTest.php

    r6945 r7902  
    1313$t = new lime_test(38, new lime_output_color()); 
    1414 
    15 class ValidatorIdentity extends sfValidator 
     15class ValidatorIdentity extends sfValidatorBase 
    1616{ 
    1717  protected function configure($options = array(), $messages = array()) 
     
    2727} 
    2828 
    29 class ValidatorIdentityWithRequired extends sfValidator 
     29class ValidatorIdentityWithRequired extends sfValidatorBase 
    3030{ 
    3131  protected function configure($options = array(), $messages = array()) 
     
    201201// ::getCharset() ::setCharset() 
    202202$t->diag('::getCharset() ::setCharset()'); 
    203 $t->is(sfValidator::getCharset(), 'UTF-8', '::getCharset() returns the charset to use for validators'); 
    204 sfValidator::setCharset('ISO-8859-1'); 
    205 $t->is(sfValidator::getCharset(), 'ISO-8859-1', '::setCharset() changes the charset to use for validators'); 
     203$t->is(sfValidatorBase::getCharset(), 'UTF-8', '::getCharset() returns the charset to use for validators'); 
     204sfValidatorBase::setCharset('ISO-8859-1'); 
     205$t->is(sfValidatorBase::getCharset(), 'ISO-8859-1', '::setCharset() changes the charset to use for validators'); 
    206206 
    207207// ->asString() 
  • branches/1.1/test/unit/validator/sfValidatorSchemaTest.php

    r7053 r7902  
    1313$t = new lime_test(84, new lime_output_color()); 
    1414 
    15 class PreValidator extends sfValidator 
     15class PreValidator extends sfValidatorBase 
    1616{ 
    1717  protected function doClean($values) 
     
    2424} 
    2525 
    26 class PostValidator extends sfValidator 
     26class PostValidator extends sfValidatorBase 
    2727{ 
    2828  protected function doClean($values) 
     
    3737} 
    3838 
    39 class Post1Validator extends sfValidator 
     39class Post1Validator extends sfValidatorBase 
    4040{ 
    4141  protected function doClean($values)