Engine
in package
Table of Contents
Properties
Methods
- __construct() : void
- Constructor
- formatIncludeCode() : string
- インクルード文を整形
- includeCommentBegin() : string
- include のデバッグコメント(start)を取得
- includeCommentEnd() : string
- include のデバッグコメント(end)を取得
- render() : string
- テンプレートをレンダリング
- setTemplateComment() : string
- 変数ブロックのコメントを設定
- spreadTemplate() : string
- テンプレート内の外部ファイル参照(#include, @include, @extends)を解決する
- expandIncludeVars() : string
- インクルードの引数を変数に展開
- extendTemplate() : string
- テンプレートの継承を解決 速度が求められる所なので、拡張性、汎用性は考えず関数で解決
- getTemplateFromAcmsPath() : string
- acmsパスからテンプレートを取得
- getTemplateFromStorage() : string
- ローカルのファイルからテンプレートを取得
- getTemplateFromUrl() : string
- URLからテンプレートを取得
- insertIncludeComment() : string
- インクルード文にコメントを追加
- resolveSection() : string
- テンプレートの継承(@section)を解決
- protectVerbatim() : string
- verbatimブロックを保護(エスケープ)
- resolveVite() : string
- restoreVerbatim() : string
- verbatimブロックを復元
Properties
$resolver
protected
Resolver
$resolver
Methods
__construct()
Constructor
public
__construct(Resolver $resolver) : void
Parameters
- $resolver : Resolver
formatIncludeCode()
インクルード文を整形
public
formatIncludeCode(string $tpl[, bool $withTwig = false ]) : string
Parameters
- $tpl : string
- $withTwig : bool = false
Return values
stringincludeCommentBegin()
include のデバッグコメント(start)を取得
public
includeCommentBegin(string $path) : string
Parameters
- $path : string
Return values
stringincludeCommentEnd()
include のデバッグコメント(end)を取得
public
includeCommentEnd(string $path) : string
Parameters
- $path : string
Return values
stringrender()
テンプレートをレンダリング
public
render(string $string, Field_Validation $post[, bool $noBuildIF = false ]) : string
Parameters
- $string : string
-
テンプレート文字列
- $post : Field_Validation
-
フォームデータ
- $noBuildIF : bool = false
-
IFブロックを解決するかどうか
Return values
stringsetTemplateComment()
変数ブロックのコメントを設定
public
setTemplateComment(string $txt, string $path) : string
Parameters
- $txt : string
- $path : string
Return values
stringspreadTemplate()
テンプレート内の外部ファイル参照(#include, @include, @extends)を解決する
public
spreadTemplate(string $txt, string $theme, int $bid[, bool $comment = true ][, bool $tplCache = false ]) : string
Parameters
- $txt : string
-
テンプレート文字列
- $theme : string
-
テーマ名
- $bid : int
-
ブログID
- $comment : bool = true
-
デバック用のコメントを出力するかどうか
- $tplCache : bool = false
-
テンプレートキャッシュを利用しているかどうか
Return values
stringexpandIncludeVars()
インクルードの引数を変数に展開
protected
expandIncludeVars(string $txt, string $jsonStr) : string
Parameters
- $txt : string
- $jsonStr : string
Return values
stringextendTemplate()
テンプレートの継承を解決 速度が求められる所なので、拡張性、汎用性は考えず関数で解決
protected
extendTemplate(string $string, string $theme, int $bid[, bool $tplCache = false ]) : string
Parameters
- $string : string
- $theme : string
- $bid : int
- $tplCache : bool = false
Return values
stringgetTemplateFromAcmsPath()
acmsパスからテンプレートを取得
protected
getTemplateFromAcmsPath(string $path) : string
Parameters
- $path : string
Return values
stringgetTemplateFromStorage()
ローカルのファイルからテンプレートを取得
protected
getTemplateFromStorage(string $path, string $theme, int $bid, string $jsonStr[, bool $tplCache = false ]) : string
Parameters
- $path : string
- $theme : string
- $bid : int
- $jsonStr : string
- $tplCache : bool = false
-
テンプレートキャッシュを利用しているかどうか
Tags
Return values
stringgetTemplateFromUrl()
URLからテンプレートを取得
protected
getTemplateFromUrl(string $url) : string
Parameters
- $url : string
Return values
stringinsertIncludeComment()
インクルード文にコメントを追加
protected
insertIncludeComment(string $path, string $txt) : string
Parameters
- $path : string
- $txt : string
Return values
stringresolveSection()
テンプレートの継承(@section)を解決
protected
resolveSection(string $string) : string
Parameters
- $string : string
Return values
stringprotectVerbatim()
verbatimブロックを保護(エスケープ)
private
protectVerbatim(string $string) : string
Parameters
- $string : string
Return values
stringresolveVite()
private
resolveVite(string $string, string $theme, int $bid) : string
Parameters
- $string : string
-
テンプレート文字列
- $theme : string
-
テーマ名
- $bid : int
-
ブログID
Tags
Return values
stringrestoreVerbatim()
verbatimブロックを復元
private
restoreVerbatim(string $string) : string
Parameters
- $string : string