PHP 클래스 TemplateConverter

파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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