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

Class: MDB2_Schema_Writer

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

Class Overview


Writes an XML schema file


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 57]
Writes an XML schema file


[ Top ]


Class Variables

$valid_types = array()

[line 61]


Type:   mixed


[ Top ]



Method Detail

MDB2_Schema_Writer (Constructor)   [line 71]

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


Parameters:

   $valid_types     

[ Top ]

__construct (Constructor)   [line 66]

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


Parameters:

   $valid_types     

[ Top ]

dumpDatabase   [line 235]

mixed dumpDatabase( array $database_definition, integer $arguments, [ $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     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   $arguments     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
   $dump     

[ Top ]

dumpSequence   [line 184]

mixed dumpSequence( string $sequence_definition, string $sequence_name, $eol, [ $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 name
string   $sequence_name     end of line characters
   $eol     
   $dump     

[ Top ]

raiseError   [line 98]

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

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

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, 16 Nov 2008 20:00:24 -0500 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.