Pix_Partial 為了讓 PHP 讓頁面更簡潔,參數使用比更靈活

package Partial
copyright 2003-2012 PIXNET Digital Media Corporation
license BSD License

 Methods

__call()

__call($func, $args) 

Parameters

$func

$args

__construct 建出一個 Pix_Partial ,並且將路徑設定成 $path

__construct(string | null $path, array $options) : void

access public

Parameters

$path

stringnull

$options

array

cache_prefix cache_id 要加入的字串

__get()

__get($k) 

Parameters

$k

__isset()

__isset($k) 

Parameters

$k

__set()

__set($k, $v) 

Parameters

$k

$v

addCommonHelpers add common helpers

addCommonHelpers() : void

static
access public

addHelper add static helper in Pix_Controller

addHelper(string $helper, array $methods, array $options) : void

static
access public

Parameters

$helper

string

Helper name

$methods

array

$options

array

breakRender 在 partial 內呼叫 function ,呼叫此 function 時,整個 partial 前面已經生成的部分會照常被印出。

breakRender() : void

access public

escape()

escape($var) 

Parameters

$var

getCommentMode()

getCommentMode() 

getHelperManager get Helper Manager

getHelperManager() : \Pix_Helper_Manager

static
access public

Returns

getNoCache 取得 nocache 是否開啟

getNoCache() : boolean

static
access public

Returns

boolean

getPath 取出 Partial 的 path

getPath() : void

access public

getTrimMode 取得 Trim Mode 是否開啟

getTrimMode() : boolean

static
access public

Returns

boolean

noRender 在 partial 內呼叫 function ,呼叫此 function 時,整個 partial 前面已經生成的部分會被捨棄。

noRender() : void

access public

partial 印出 $file 的內容,並且將 $data 的參數轉成 $this

partial(string $file, array | \Pix_Partial | null $data, array | string $options) : string

access public

Parameters

$file

string

$data

array\Pix_Partialnull

傳進去的參數

$options

arraystring

設定 或 cache id

Returns

string

setCacheWriteOnlyMode()

setCacheWriteOnlyMode($write_only) 

Parameters

$write_only

setCommentMode 註解模式,會在 partial 前面顯示他是哪個 partial

setCommentMode(mixed $comment_mode) : void

static
access public

Parameters

$comment_mode

mixed

setNoCache 是否不啟動 cache (預設啟動)

setNoCache(boolean $nocache) : void

static
access public

Parameters

$nocache

boolean

setPath 將 Partial 自動讀取路徑設定為 $path

setPath(string $path) : void

access public

Parameters

$path

string

setTrimMode 是否要啟動 Trim mode ,預設把每一行的前後空白拿掉

setTrimMode(boolean $trim_mode) : void

static
access public

Parameters

$trim_mode

boolean

 Properties

 

$_cache_prefix

$_cache_prefix 

 

$_data

$_data 

 

$_escape

$_escape 

 

$_path

$_path 

 

$alert_messages

$alert_messages