PHP Class TemplateConverter

Afficher le fichier Open project: sourcefabric/newscoop Class Usage Examples

Protected Properties

Свойство Type Description
$m_templateContent string
$m_templateOriginalContent string

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

Class constructor
public __construct ( )

parse() public méthode

Parses the original template file and replaces old syntax with new one.
public parse ( ) : boolean
Résultat boolean

read() public méthode

Reads the original template file content.
public read ( string $p_filePath ) : boolean
$p_filePath string Full path to the template file
Résultat boolean True on success, false on failure

write() public méthode

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
Résultat boolean True on success, false on failure

Property Details

$m_templateContent protected_oe property

protected string $m_templateContent
Résultat string

$m_templateOriginalContent protected_oe property

protected string $m_templateOriginalContent
Résultat string