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

Class: MDB2_Schema_Validate

Source Location: /MDB2_Schema-0.7.2/MDB2/Schema/Validate.php

Class Overview


Validates an XML schema file


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 57]
Validates an XML schema file


[ Top ]


Class Variables

$fail_on_invalid_names =  true

[line 61]


Type:   mixed


[ Top ]

$force_defaults =  true

[line 63]


Type:   mixed


[ Top ]

$valid_types = array()

[line 62]


Type:   mixed


[ Top ]



Method Detail

MDB2_Schema_Validate (Constructor)   [line 82]

MDB2_Schema_Validate MDB2_Schema_Validate( [ $fail_on_invalid_names = true], [ $valid_types = array()], [ $force_defaults = true])


Parameters:

   $fail_on_invalid_names   — 
   $valid_types   — 
   $force_defaults   — 

[ Top ]

__construct (Constructor)   [line 68]

MDB2_Schema_Validate __construct( [ $fail_on_invalid_names = true], [ $valid_types = array()], [ $force_defaults = true])


Parameters:

   $fail_on_invalid_names   — 
   $valid_types   — 
   $force_defaults   — 

[ Top ]

isBoolean   [line 111]

bool isBoolean( mixed &$value)

Verifies if a given value can be considered boolean. If yes, set value to true or false according to its actual contents and return true. If not, keep its contents untouched and return false.
  • Access: public

Parameters:

mixed   &$value   —  value to be checked

[ Top ]

raiseError   [line 90]

void &raiseError( $ecode, [ $msg = null])


Parameters:

   $ecode   — 
   $msg   — 

[ Top ]

validateDatabase   [line 533]

bool|error validateDatabase( array &$database)

Checks whether a parsed database is valid. Modify its structure and data when necessary.
  • Return: object
  • Access: public

Parameters:

array   &$database   —  multi dimensional array that contains the structure and optional data of the database.

[ Top ]

validateDataField   [line 605]

bool|error validateDataField( array $table_fields, array $instruction_fields, string &$field)

Checks whether a parsed DML-field is valid. Modify its structure when necessary. This is called when validating INSERT and UPDATE.
  • Return: object
  • Access: public

Parameters:

array   $table_fields   —  multi dimensional array that contains the definition for current table's fields.
array   $instruction_fields   —  multi dimensional array that contains the parsed fields of the current DML instruction.
string   &$field   —  array that contains the parsed instruction field

[ Top ]

validateDataFieldValue   [line 651]

bool|error validateDataFieldValue( array $field_def, string &$field_value, string $field_name)

Checks whether a given value is compatible with a table field. This is done when parsing a field for a INSERT or UPDATE instruction.
  • Return: object
  • See: MDB2_Schema_Validate::validateInsertField()
  • Access: public

Parameters:

array   $field_def   —  multi dimensional array that contains the definition for current table's fields.
string   &$field_value   —  value to fill the parsed field
string   $field_name   —  name of the parsed field

[ Top ]

validateField   [line 273]

bool|error validateField( array $fields, array &$field, string $field_name)

Checks whether the definition of a parsed field is valid. Modify field definition when necessary.
  • Return: object
  • Access: public

Parameters:

array   $fields   —  multi dimensional array that contains the fields of current table.
array   &$field   —  multi dimensional array that contains the structure of the parsed field.
string   $field_name   —  name of the parsed field

[ Top ]

validateIndex   [line 406]

bool|error validateIndex( array $table_indexes, array &$index, string $index_name)

Checks whether a parsed index is valid. Modify index definition when necessary.
  • Return: object
  • Access: public

Parameters:

array   $table_indexes   —  multi dimensional array that contains the indexes of current table.
array   &$index   —  multi dimensional array that contains the structure of the parsed index.
string   $index_name   —  name of the parsed index

[ Top ]

validateIndexField   [line 448]

bool|error validateIndexField( array $index_fields, array &$field, string $field_name)

Checks whether a parsed index-field is valid. Modify its definition when necessary.
  • Return: object
  • Access: public

Parameters:

array   $index_fields   —  multi dimensional array that contains the fields of current index.
array   &$field   —  multi dimensional array that contains the structure of the parsed index-field.
string   $field_name   —  name of the parsed index-field

[ Top ]

validateSequence   [line 484]

bool|error validateSequence( array $sequences, array &$sequence, string $sequence_name)

Checks whether the definition of a parsed sequence is valid. Modify sequence definition when necessary.
  • Return: object
  • Access: public

Parameters:

array   $sequences   —  multi dimensional array that contains the sequences of current database.
array   &$sequence   —  multi dimensional array that contains the structure of the parsed sequence.
string   $sequence_name   —  name of the parsed sequence

[ Top ]

validateTable   [line 162]

bool|error validateTable( array $tables, array &$table, string $table_name)

Checks whether the definition of a parsed table is valid. Modify table definition when necessary.
  • Return: object
  • Access: public

Parameters:

array   $tables   —  multi dimensional array that contains the tables of current database.
array   &$table   —  multi dimensional array that contains the structure and optional data of the table.
string   $table_name   —  name of the parsed table

[ Top ]


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