model/modx/transport/modtranslator.class.php

Includes Classes 
package
modx
subpackage
transport
Classes
modTranslator

Description

\modTranslator

Extends from
\modTranslate095
package
modx
Properties
$classes
$files
$paths
$patterns
$recursive
Methods
__construct
addClass
addFile
addPath
addPattern
getAllSubdirs
processAllFields
translateSite

Description

Abstracts the pre-097 site conversion utilities.

Properties

$classesCan either be an array of array of classname => fields to translate, empty to skip classes or null to process all standard content fields for MODX (use processAllFields())

array $classes = ''

Details

array
Can either be an array of array of classname => fields to translate, empty to skip classes or null to process all standard content fields for MODX (use processAllFields())
visibility
public
default
final
false
static
false

$filesAn array of files (with full paths) to be translated

array $files = ''

Details

array
An array of files (with full paths) to be translated
visibility
public
default
final
false
static
false

$pathsPaths of files, according to the patterns, to be translated (recursive)

array $paths = ''

Details

array
Paths of files, according to the patterns, to be translated (recursive)
visibility
public
default
final
false
static
false

$patternsFile patterns to limit the file types to be included for translation in the paths

string $patterns = ''

Details

string
File patterns to limit the file types to be included for translation in the paths
visibility
public
default
final
false
static
false

$recursiveIf true, paths added will be recursively translated.

boolean $recursive = ''

Details

boolean
If true, paths added will be recursively translated.
visibility
public
default
final
false
static
false

Methods

__construct

__construct(  $modx,  $recursive = true ) :
Arguments
$modx
$recursive
Details
visibility
public
final
false
static
false

addClass

addClass( ) :

Adds a class to be translated.

Can have an unlimited number of arguments.

Details
visibility
public
final
false
static
false

addFile

addFile( ) :

Adds a file to be translated.

Can have an unlimited number of arguments.

Details
visibility
public
final
false
static
false

addPath

addPath( ) :

Adds a path to be translated.

Can have an unlimited number of arguments.

Details
visibility
public
final
false
static
false

addPattern

addPattern( ) :

Adds a pattern to be translated.

Can have an unlimited number of arguments.

Details
visibility
public
final
false
static
false

getAllSubdirs

getAllSubdirs( string $path ) :

Recursively adds all subdirs of a directory.

Arguments
$path
string
The path to recursively search in.
Details
visibility
public
final
false
static
false

processAllFields

processAllFields( boolean $b = true ) :

Sets the translator to process all standard MODX fields.

Arguments
$b
boolean
If false, will revert to an empty array of classes.
Details
visibility
public
final
false
static
false

translateSite

translateSite( boolean $save = false, boolean $toFile = false ) :

Translates the site.

Arguments
$save
boolean
Determines if translation is written to the database tables and/or files (changes are permanent if true)
$toFile
boolean
A path to a file where a log of the translation session is written
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox 0.11.2.