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

Class: DB_Table_Valid

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

Class Overview


DB_Table_Valid validates values against DB_Table column types.


Author(s):

Version:

  • Release: 1.5.6

Methods


Inherited Variables

Inherited Methods


Class Details

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


[ Top ]


Method Detail

isBigint   [line 196]

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 98]

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 127]

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 448]

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 372]

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 231]

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 308]

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 173]

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 287]

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 150]

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 329]

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 411]

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 15:28:00 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.