Open Journal Systems  3.3.0
xmlToPo Class Reference
Inheritance diagram for xmlToPo:
CommandLineTool

Public Member Functions

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

Static Public Member Functions

static convertFile ($source, $target)
 
static parseLocaleFile ($filename)
 

Protected Attributes

 $source
 
 $target
 

Additional Inherited Members

- Data Fields inherited from CommandLineTool
 $argv
 
 $scriptName
 

Detailed Description

Definition at line 16 of file xmlToPo.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor

Reimplemented from CommandLineTool.

Definition at line 32 of file xmlToPo.php.

References CommandLineTool\$argv, $source, and usage().

Member Function Documentation

◆ convertFile()

static xmlToPo::convertFile (   $source,
  $target 
)
static

Convert a file from XML to PO.

Parameters
$sourceSource filename
$targetTarget filename

Definition at line 100 of file xmlToPo.php.

References $source, $target, and parseLocaleFile().

Referenced by execute().

◆ execute()

xmlToPo::execute ( )

Convert XML locale content to PO format.

Definition at line 119 of file xmlToPo.php.

References convertFile().

◆ parseLocaleFile()

static xmlToPo::parseLocaleFile (   $filename)
static

Parse a locale file into an array.

Parameters
$filenamestring Filename to locale file
Returns
array? (key => message)

Definition at line 80 of file xmlToPo.php.

Referenced by convertFile().

◆ usage()

xmlToPo::usage ( )

Print command usage information.

Reimplemented from CommandLineTool.

Definition at line 67 of file xmlToPo.php.

Referenced by __construct().

Field Documentation

◆ $source

string xmlToPo::$source
protected

Name of source file/directory

Definition at line 21 of file xmlToPo.php.

Referenced by __construct(), and convertFile().

◆ $target

string xmlToPo::$target
protected

Name of target file/directory

Definition at line 27 of file xmlToPo.php.

Referenced by convertFile().


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