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

Class: MDB2_Schema_Writer

Source Location: /MDB2_Schema-0.8.6/MDB2/Schema/Writer.php

Class Overview


Writes an XML schema file


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 60]
Writes an XML schema file


[ Top ]


Class Variables

$valid_types = array()

[line 64]


Type:   mixed


[ Top ]



Method Detail

MDB2_Schema_Writer (Constructor)   [line 96]

void MDB2_Schema_Writer( [array $valid_types = array()])

PHP 4 compatible constructor
  • Access: public

Parameters:

array   $valid_types   —  information of all valid fields types

[ Top ]

__construct (Constructor)   [line 80]

void __construct( [array $valid_types = array()])

PHP 5 constructor
  • Access: public

Parameters:

array   $valid_types   —  information of all valid fields types

[ Top ]

dumpDatabase   [line 273]

mixed dumpDatabase( array $database_definition, array $arguments, [integer $dump = MDB2_SCHEMA_DUMP_ALL])

Dump a previously parsed database structure in the Metabase schema XML based format suitable for the Metabase parser. This function may optionally dump the database definition with initialization commands that specify the data that is currently present in the tables.
  • Return: MDB2_OK on success, or a error object
  • Access: public

Parameters:

array   $database_definition   —  unknown
array   $arguments   —  associative array that takes pairs of tag names and values that define dump options. array ( 'output_mode' => String 'file' : dump into a file default: dump using a function 'output' => String depending on the 'Output_Mode' name of the file name of the function 'end_of_line' => String end of line delimiter that should be used default: "\n" );
integer   $dump   —  determines what data to dump MDB2_SCHEMA_DUMP_ALL : the entire db MDB2_SCHEMA_DUMP_STRUCTURE : only the structure of the db MDB2_SCHEMA_DUMP_CONTENT : only the content of the db

[ Top ]

dumpSequence   [line 220]

mixed dumpSequence( string $sequence_definition, string $sequence_name, string $eol, [integer $dump = MDB2_SCHEMA_DUMP_ALL])

dump the structure of a sequence
  • Return: string xml sequence definition on success, or a error object
  • Access: public

Parameters:

string   $sequence_definition   —  sequence definition
string   $sequence_name   —  sequence name
string   $eol   —  end of line characters
integer   $dump   —  determines what data to dump MDB2_SCHEMA_DUMP_ALL : the entire db MDB2_SCHEMA_DUMP_STRUCTURE : only the structure of the db MDB2_SCHEMA_DUMP_CONTENT : only the content of the db

[ Top ]

raiseError   [line 126]

object a &raiseError( [int|PEAR_Error $code = null], [int $mode = null], [string $options = null], [string $userinfo = null])

This method is used to communicate an error and invoke error callbacks etc. Basically a wrapper for PEAR::raiseError without the message string.
  • Return: PEAR error object
  • See: PEAR_Error
  • Access: public

Parameters:

int|PEAR_Error   $code   —  integer error code or and PEAR_Error instance
int   $mode   —  error mode, see PEAR_Error docs error level (E_USER_NOTICE etc). If error mode is PEAR_ERROR_CALLBACK, this is the callback function, either as a function name, or as an array of an object and method name. For other error modes this parameter is ignored.
string   $options   —  Extra debug information. Defaults to the last query and native error code.
string   $userinfo   —  User-friendly error message

[ Top ]

writeExpression   [line 562]

string writeExpression( array $element, [integer $offset = 0], [array $arguments = null])

Dumps the structure of an element. Elements can be value, column, function or expression.

Parameters:

array   $element   —  multi dimensional array that represents the parsed element of a DML instruction.
integer   $offset   —  base indentation width
array   $arguments   —  associative array that takes pairs of tag names and values that define dump options.

[ Top ]

_escapeSpecialChars   [line 143]

string _escapeSpecialChars( string $string)

add escapecharacters to all special characters in a string
  • Return: escaped string
  • Access: protected

Parameters:

string   $string   —  string that should be escaped

[ Top ]


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