Open Journal Systems  3.3.0
XmlToSqlTool Class Reference
Inheritance diagram for XmlToSqlTool:
CommandLineTool dbXMLtoSQL

Public Member Functions

 __construct ($argv=array())
 
 execute ()
 
 usage ()
 

Data Fields

 $command
 
 $inputFile
 
 $outputFile
 
 $type
 
- Data Fields inherited from CommandLineTool
 $argv
 
 $scriptName
 

Detailed Description

CLI tool to output the SQL statements corresponding to an XML database schema.

Definition at line 19 of file XmlToSqlTool.inc.php.

Constructor & Destructor Documentation

◆ __construct()

XmlToSqlTool::__construct (   $argv = array())

Constructor.

Parameters
$argvarray command-line arguments If specified, the first argument should be the file to parse

Reimplemented from CommandLineTool.

Reimplemented in dbXMLtoSQL.

Definition at line 50 of file XmlToSqlTool.inc.php.

References CommandLineTool\$argv, and usage().

Member Function Documentation

◆ execute()

XmlToSqlTool::execute ( )

Parse an XML database file and output the corresponding SQL statements. See lib/pkp/dtd/xmlSchema.dtd for the format of the XML files.

Definition at line 102 of file XmlToSqlTool.inc.php.

References DBConnection\getConn(), and Config\getVar().

◆ usage()

XmlToSqlTool::usage ( )

Print command usage information.

Reimplemented from CommandLineTool.

Definition at line 87 of file XmlToSqlTool.inc.php.

Referenced by __construct().

Field Documentation

◆ $command

string XmlToSqlTool::$command

command to execute (print|execute|upgrade)

Definition at line 31 of file XmlToSqlTool.inc.php.

◆ $inputFile

string XmlToSqlTool::$inputFile

XML file to parse

Definition at line 37 of file XmlToSqlTool.inc.php.

◆ $outputFile

string XmlToSqlTool::$outputFile

file to save SQL statements in

Definition at line 43 of file XmlToSqlTool.inc.php.

◆ $type

string XmlToSqlTool::$type

type of file to parse (schema or data)

Definition at line 25 of file XmlToSqlTool.inc.php.


The documentation for this class was generated from the following file: