PHP Класс TemplateConverter

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

Защищенные свойства (Protected)

Свойство Тип Описание
$m_templateContent string
$m_templateOriginalContent string

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

Метод Описание
__construct ( ) Class constructor
parse ( ) : boolean Parses the original template file and replaces old syntax with new one.
read ( string $p_filePath ) : boolean Reads the original template file content.
write ( string $p_templateFileName = null ) : boolean Writes the new template syntax to the output file.

Приватные методы

Метод Описание
getAllTagsFromTemplate ( $p_pattern ) : array Gets all the tags from the source template.
getNewTagContent ( array $p_optArray, $p_oldTagContent = null )
parseOptionsString ( string $p_optionsString ) : array Parses the options string and returns an array of words.

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

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

Class constructor
public __construct ( )

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

Parses the original template file and replaces old syntax with new one.
public parse ( ) : boolean
Результат boolean

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

Reads the original template file content.
public read ( string $p_filePath ) : boolean
$p_filePath string Full path to the template file
Результат boolean True on success, false on failure

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

Output file might be either the given as parameter or the original file.
public write ( string $p_templateFileName = null ) : boolean
$p_templateFileName string File name for the template after conversion, default is the original template file name
Результат boolean True on success, false on failure

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

$m_templateContent защищенное свойство

protected string $m_templateContent
Результат string

$m_templateOriginalContent защищенное свойство

protected string $m_templateOriginalContent
Результат string