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

Class: MDB2_Schema_Validate

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

Class Overview


Validates an XML schema file


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 63]
Validates an XML schema file


[ Top ]


Class Variables

$fail_on_invalid_names =  true

[line 67]


Type:   mixed


[ Top ]

$force_defaults =  true

[line 71]


Type:   mixed


[ Top ]

$valid_types = array()

[line 69]


Type:   mixed


[ Top ]



Method Detail

MDB2_Schema_Validate (Constructor)   [line 94]

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

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

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

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


Parameters:

   $ecode     
   $msg     

[ Top ]

validateConstraint   [line 507]

bool|error validateConstraint( array $table_constraints, array &$constraint, string $constraint_name)

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

Parameters:

array   $table_constraints     multi dimensional array that contains the constraints of current table.
array   &$constraint     multi dimensional array that contains the structure of the parsed foreign key.
string   $constraint_name     name of the parsed foreign key

[ Top ]

validateConstraintField   [line 556]

bool|error validateConstraintField( array $constraint_fields, string $field_name)

Checks whether a foreign-field is valid.
  • Return: object
  • Access: public

Parameters:

array   $constraint_fields     multi dimensional array that contains the fields of current foreign key.
string   $field_name     name of the parsed foreign-field

[ Top ]

validateConstraintReferencedField   [line 583]

bool|error validateConstraintReferencedField( array $referenced_fields, string $field_name)

Checks whether a foreign-referenced field is valid.
  • Return: object
  • Access: public

Parameters:

array   $referenced_fields     multi dimensional array that contains the fields of current foreign key.
string   $field_name     name of the parsed foreign-field

[ Top ]

validateDatabase   [line 662]

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

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

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

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

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

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

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

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 Sun, 22 Feb 2009 22:30:12 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.