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

Class: MDB2_Schema_Writer

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

Class Overview


Writes an XML schema file


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 63]
Writes an XML schema file


[ Top ]


Class Variables

$valid_types = array()

[line 67]


Type:   mixed


[ Top ]



Method Detail

MDB2_Schema_Writer (Constructor)   [line 77]

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


Parameters:

   $valid_types     

[ Top ]

__construct (Constructor)   [line 72]

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


Parameters:

   $valid_types     

[ Top ]

dumpDatabase   [line 251]

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

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

object a &raiseError( [int|PEAR_Error $code = null], [int $mode = null], [string $options = null], [ $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.
   $userinfo     

[ Top ]

writeExpression   [line 540]

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

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