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

Class: MDB2_Schema_Tool

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

Class Overview


Command line tool to work with database schemas


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 71]
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 78]

MDB2_Schema_Tool __construct( array $args)

Run the schema tool
  • Access: public

Parameters:

array   $args     Array of command line arguments

[ Top ]

doDump   [line 425]

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

void doHelp( )

Displays generic help to stdout
  • Access: protected

[ Top ]

doHelpDump   [line 205]

void doHelpDump( )

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

[ Top ]

doHelpInit   [line 230]

void doHelpInit( )

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

[ Top ]

doHelpLoad   [line 257]

void doHelpLoad( )

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

[ Top ]

doInit   [line 526]

void doInit( array $args)

Initializes a database with data
  • Access: protected

Parameters:

array   $args     Command line arguments

[ Top ]

doLoad   [line 482]

void doLoad( array $args)

Loads a database schema
  • Access: protected

Parameters:

array   $args     Command line arguments

[ Top ]

getAction   [line 117]

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

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

array getSchemaOptions( )

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

[ Top ]

readPasswordFromStdin   [line 399]

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

void run( )

Runs the tool with command line arguments
  • Access: public

[ Top ]

setPasswordIntoDsn   [line 373]

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

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

void toStdErr( string $msg)

Writes the message to stderr
  • Access: protected

Parameters:

string   $msg     Message to print

[ Top ]


Documentation generated on Sun, 22 Feb 2009 22:30:11 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.