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

Class: MDB2_Schema_Tool

Source Location: /MDB2_Schema-0.8.4/MDB2/Schema/Tool.php

Class Overview


Command line tool to work with database schemas


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 66]
Command line tool to work with database schemas

Functionality:

  • dump a database schema to stdout
  • import schema into database
  • create a diff between two schemas
  • apply diff to database



[ Top ]


Method Detail

__construct (Constructor)   [line 73]

MDB2_Schema_Tool __construct( array $args)

Run the schema tool
  • Access: public

Parameters:

array   $args     Array of command line arguments

[ Top ]

doDump   [line 420]

void doDump( array $args)

Creates a database schema dump and sends it to stdout
  • Access: protected

Parameters:

array   $args     Command line arguments

[ Top ]

doHelp   [line 175]

void doHelp( )

Displays generic help to stdout
  • Access: protected

[ Top ]

doHelpDump   [line 200]

void doHelpDump( )

Displays the help screen for "dump" command
  • Access: protected

[ Top ]

doHelpInit   [line 225]

void doHelpInit( )

Displays the help screen for "init" command
  • Access: protected

[ Top ]

doHelpLoad   [line 252]

void doHelpLoad( )

Displays the help screen for "load" command
  • Access: protected

[ Top ]

doInit   [line 521]

void doInit( array $args)

Initializes a database with data
  • Access: protected

Parameters:

array   $args     Command line arguments

[ Top ]

doLoad   [line 477]

void doLoad( array $args)

Loads a database schema
  • Access: protected

Parameters:

array   $args     Command line arguments

[ Top ]

getAction   [line 112]

string getAction( array &$args)

Reads the first parameter from the argument array and returns the action.
  • Return: Action to execute
  • Access: protected

Parameters:

array   &$args     Command line parameters

[ Top ]

getFileOrDsn   [line 325]

array getFileOrDsn( array &$args)

Loads a file or a dsn from the arguments
  • Return: Array of ('file'|'dsn', $value)
  • Access: protected

Parameters:

array   &$args     Array of arguments to the program

[ Top ]

getSchemaOptions   [line 279]

array getSchemaOptions( )

Returns an array of options for MDB2_Schema constructor
  • Return: Options for MDB2_Schema constructor
  • Access: protected

[ Top ]

readPasswordFromStdin   [line 394]

string readPasswordFromStdin( string $dsn)

Reads a password from stdin
  • Return: Password
  • Access: protected

Parameters:

string   $dsn     DSN name to put into the message

[ Top ]

run   [line 90]

void run( )

Runs the tool with command line arguments
  • Access: public

[ Top ]

setPasswordIntoDsn   [line 368]

string setPasswordIntoDsn( string $dsn, string $password)

Takes a DSN data source name and integrates the given password into it.
  • Return: DSN with password
  • Access: protected

Parameters:

string   $dsn     Data source name
string   $password     Password

[ Top ]

throwExceptionOnError   [line 304]

void throwExceptionOnError( mixed $object, [string $location = ''])

Checks if the passed parameter is a PEAR_Error object and throws an exception in that case.
  • Access: protected

Parameters:

mixed   $object     Some variable to check
string   $location     Where the error occured

[ Top ]

toStdErr   [line 163]

void toStdErr( string $msg)

Writes the message to stderr
  • Access: protected

Parameters:

string   $msg     Message to print

[ Top ]


Documentation generated on Mon, 17 Nov 2008 19:00:21 -0500 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.