DB_Table
[ class tree: DB_Table ] [ index: DB_Table ] [ all elements ]

Class: DB_Table_Valid

Source Location: /DB_Table-0.23.0/DB/Table/Valid.php

Class Overview


DB_Table_Valid validates values against DB_Table column types.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 33]
DB_Table_Valid validates values against DB_Table column types.

$Id: Valid.php,v 1.4 2004/11/08 02:36:00 pmjones Exp $



[ Top ]


Method Detail

isBigint   [line 148]

boolean isBigint( mixed $value)

Check if a value validates against the 'bigint' data type.
  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.

[ Top ]

isBoolean   [line 50]

boolean isBoolean( mixed $value)

Check if a value validates against the 'boolean' data type.
  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.

[ Top ]

isChar   [line 79]

boolean isChar( mixed $value, $colsize)

Check if a value validates against the 'char' and 'varchar' data type.

We allow most anything here, only checking that the length is in range.

  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.
   $colsize   — 

[ Top ]

isClob   [line 400]

boolean isClob( mixed $value)

Check if a value validates against the 'clob' data type.
  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.

[ Top ]

isDate   [line 324]

boolean isDate( mixed $value)

Check if a value validates against the 'date' data type.
  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.

[ Top ]

isDecimal   [line 183]

boolean isDecimal( mixed $value, string $colsize, string $colscope)

Check if a value validates against the 'decimal' data type.

For the column defined "DECIMAL(5,2)" standard SQL requires that the column be able to store any value with 5 digits and 2 decimals. In this case, therefore, the range of values that can be stored in the column is from -999.99 to 999.99. DB_Table attempts to enforce this behavior regardless of the RDBMS backend behavior.

  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.
string   $colsize   —  The 'size' to use for validation (to make sure of min/max and decimal places).
string   $colscope   —  The 'scope' to use for validation (to make sure of min/max and decimal places).

[ Top ]

isDouble   [line 260]

boolean isDouble( mixed $value)

Check if a value validates against the 'double' data type.
  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.

[ Top ]

isInteger   [line 125]

boolean isInteger( mixed $value)

Check if a value validates against the 'integer' data type.
  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.

[ Top ]

isSingle   [line 239]

boolean isSingle( mixed $value)

Check if a value validates against the 'single' data type.
  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.

[ Top ]

isSmallint   [line 102]

boolean isSmallint( mixed $value)

Check if a value validates against the 'smallint' data type.
  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.

[ Top ]

isTime   [line 281]

boolean isTime( mixed $value)

Check if a value validates against the 'time' data type.
  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.

[ Top ]

isTimestamp   [line 363]

boolean isTimestamp( mixed $value)

Check if a value validates against the 'timestamp' data type.
  • Return: True if the value is valid for the data type, false if not.
  • Access: public

Parameters:

mixed   $value   —  The value to validate.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:10:11 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.