Class: Doctrine_Validator

Source Location: /Doctrine/Validator.php

Class Doctrine_Validator

Class Overview

Doctrine_Validator Doctrine_Validator performs validations in record properties

Located in /Doctrine/Validator.php [line 33]

Doctrine_Object
   |
   --Doctrine_Validator
Author(s): Information Tags:
Version:  $Revision: 2193 $
Link:  www.phpdoctrine.com
Since:  1.0
License:  LGPL

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Doctrine_Object

Doctrine_Object::$_null

Inherited From Doctrine_Object

Doctrine_Object::getNullObject()
getNullObject returns the null object associated with this object
Doctrine_Object::initNullObject()
initNullObject initializes the null object

[ Top ]
Property Summary
static array   $validators  

[ Top ]
Method Summary
static string   gettype()   returns the type of loosely typed variable
static Doctrine_Validator_Interface   getValidator()   returns a validator object
static boolean   isValidType()   returns whether or not the given variable is valid type
static string   phpType()   converts a doctrine type to native php type
boolean   hasErrors()   whether or not this validator has errors
void   validateLength()   Validates the length of a field.
void   validateRecord()   validates a given record and saves possible errors in Doctrine_Validator::$stack

[ Top ]
Properties
static array   $validators = array() [line 38]
API Tags:
Access:  private


[ Top ]
Methods
static method gettype  [line 246]

  static string gettype( mixed $var  )

returns the type of loosely typed variable

Parameters:
mixed   $var: 

API Tags:
Access:  public


[ Top ]
static method getValidator  [line 45]

  static Doctrine_Validator_Interface getValidator( string $name  )

returns a validator object

Parameters:
string   $name: 

API Tags:
Access:  public


[ Top ]
static method isValidType  [line 214]

  static boolean isValidType( mixed $var, string $type  )

returns whether or not the given variable is valid type

Parameters:
mixed   $var: 
string   $type: 

API Tags:
Access:  public


[ Top ]
static method phpType  [line 189]

  static string phpType( $doctrineType $doctrineType  )

converts a doctrine type to native php type

Parameters:
$doctrineType   $doctrineType: 

API Tags:
Access:  public


[ Top ]
hasErrors  [line 179]

  boolean hasErrors( )

whether or not this validator has errors


API Tags:
Access:  public


[ Top ]
validateLength  [line 159]

  void validateLength( $column, $key, $value  )

Validates the length of a field.

Parameters:
   $column: 
   $key: 
   $value: 

API Tags:
Access:  private


[ Top ]
validateRecord  [line 65]

  void validateRecord( Doctrine_Record $record  )

validates a given record and saves possible errors in Doctrine_Validator::$stack

Parameters:
Doctrine_Record   $record: 

API Tags:
Access:  public


[ Top ]