PHP Класс Vsch\TranslationManager\Classes\TranslationFileRewriter

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$firstLevelKeys contains the key portion of the first level identifier as the key and the value is [ 'section' => int, // index of the section this identifier belongs to. -1 means before first. 'ordinal' => int, // ordinal position of this identifier in the section 'quotes' => string, // type of quoting used for the key if it was a string, ', ", << string, // type of quoting used for value if it was a string, ', ", <<
$options
$sections containing the multi-line comment text as they appear in the file, including leading and trailing blank lines. Indexed by the count of the multi-line comment.
$source string
$tokens array

Открытые методы

Метод Описание
__construct ( ) TranslationFileRewriter constructor.
__toString ( ) : string The __toString method allows a class to decide how it will react when it is converted to a string.
formatForExport ( $trans, $options = null )
optionFlags ( $optionNames )
parseSource ( $source )
str_count_chars ( $chars, $string )
str_count_trailing ( $chars, $string )

Защищенные методы

Метод Описание
formatSection ( $trans, $options = null, $indent )
wrapQuotes ( $value, $options = null )

Описание методов

__construct() публичный Метод

TranslationFileRewriter constructor.
public __construct ( )

__toString() публичный Метод

The __toString method allows a class to decide how it will react when it is converted to a string.
public __toString ( ) : string
Результат string

formatForExport() публичный Метод

public formatForExport ( $trans, $options = null )

formatSection() защищенный Метод

protected formatSection ( $trans, $options = null, $indent )

optionFlags() публичный статический Метод

public static optionFlags ( $optionNames )

parseSource() публичный Метод

public parseSource ( $source )
$source TODO: Quite a bit of kludge but does the job. Needs clean up, it is hard on the eyes.

str_count_chars() публичный статический Метод

public static str_count_chars ( $chars, $string )

str_count_trailing() публичный статический Метод

public static str_count_trailing ( $chars, $string )

wrapQuotes() защищенный Метод

protected wrapQuotes ( $value, $options = null )

Описание свойств

$firstLevelKeys публичное свойство

contains the key portion of the first level identifier as the key and the value is [ 'section' => int, // index of the section this identifier belongs to. -1 means before first. 'ordinal' => int, // ordinal position of this identifier in the section 'quotes' => string, // type of quoting used for the key if it was a string, ', ", << string, // type of quoting used for value if it was a string, ', ", <<
public $firstLevelKeys

$options публичное статическое свойство

public static $options

$sections публичное свойство

containing the multi-line comment text as they appear in the file, including leading and trailing blank lines. Indexed by the count of the multi-line comment.
public $sections

$source публичное свойство

public string $source
Результат string

$tokens публичное свойство

public array $tokens
Результат array