Changeset 4555

Show
Ignore:
Timestamp:
06/24/08 04:15:13 (13 months ago)
Author:
jwage
Message:

Documentation.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.11/lib/Doctrine/Validator.php

    r4501 r4555  
    2121 
    2222/** 
    23  * Doctrine_Validator 
    24  * Doctrine_Validator performs validations on record properties 
     23 * This class is responsible for performing all validations on record properties 
    2524 * 
    2625 * @package     Doctrine 
     
    4140 
    4241    /** 
    43      * returns a validator object 
     42     * Get a validator instance for the passed $name 
    4443     * 
    45      * @param string $name 
    46      * @return Doctrine_Validator_Interface 
     44     * @param  string   $name  Name of the validator or the validator class name 
     45     * @return Doctrine_Validator_Interface $validator 
    4746     */ 
    4847    public static function getValidator($name) 
     
    6362 
    6463    /** 
    65      * validates a given record and saves possible errors 
    66      * in Doctrine_Validator::$stack 
     64     * Validates a given record and saves possible errors in Doctrine_Validator::$stack 
    6765     * 
    68      * @param Doctrine_Record $record 
     66     * @param  Doctrine_Record $record 
    6967     * @return void 
    7068     */ 
     
    8482     * Validates the length of a field. 
    8583     * 
    86      * @param string $value 
    87      * @param string $type 
    88      * @param string $maximumLength 
    89      * @return boolean $success 
     84     * @param  string  $value         Value to validate 
     85     * @param  string  $type          Type of field being validated 
     86     * @param  string  $maximumLength Maximum length allowed for the column 
     87     * @return boolean $success       True/false for whether the value passed validation 
    9088     */ 
    9189    public static function validateLength($value, $type, $maximumLength) 
     
    105103 
    106104    /** 
    107      * whether or not this validator has errors 
     105     * Whether or not errors exist on this validator 
    108106     * 
    109      * @return boolean 
     107     * @return boolean True/false for whether or not this validate instance has error 
    110108     */ 
    111109    public function hasErrors() 
     
    115113 
    116114    /** 
    117      * returns whether or not the given variable is 
    118      * valid type 
     115     * Validate the type of the passed variable 
    119116     * 
    120      * @param mixed $var 
    121      * @param string $type 
     117     * @param  mixed  $var   Variable to validate 
     118     * @param  string $type  Type of the variable expected 
    122119     * @return boolean 
    123120     */