PHP Class Pix_Partial, pixframework

Datei anzeigen Open project: pixnet/pixframework Class Usage Examples

Public Properties

Property Type Description
$_cache_prefix
$_data
$_escape
$_path
$alert_messages

Protected Properties

Property Type Description
$_comment_mode
$_helper_manager Pix_Helper_Manager
$_minify_mode
$_nocache
$_trim_mode
$_write_only_mode

Public Methods

Method Description
__call ( $func, $args )
__construct ( string | null $path = null, array $options = [] ) : void __construct 建出一個 Pix_Partial ,並且將路徑設定成 $path
__get ( $k )
__isset ( $k )
__set ( $k, $v )
addCommonHelpers ( ) : void addCommonHelpers add common helpers
addHelper ( string $helper, array $methods = null, array $options = [] ) : void addHelper add static helper in Pix_Controller
breakRender ( ) : void breakRender 在 partial 內呼叫 function ,呼叫此 function 時,整個 partial 前面已經生成的部分會照常被印出。
escape ( $var )
getCommentMode ( )
getHelperManager ( ) : Pix_Helper_Manager getHelperManager get Helper Manager
getMinifyMode ( ) : boolean getMinifyMode 取得 Minify Mode 是否開啟
getNoCache ( ) : boolean getNoCache 取得 nocache 是否開啟
getPath ( ) : void getPath 取出 Partial 的 path
getTrimMode ( ) : boolean getTrimMode 取得 Trim Mode 是否開啟
noRender ( ) : void noRender 在 partial 內呼叫 function ,呼叫此 function 時,整個 partial 前面已經生成的部分會被捨棄。
partial ( string $file, array | Pix_Partial | null $data = null, array | string $options = null ) : string partial 印出 $file 的內容,並且將 $data 的參數轉成 $this
setCacheWriteOnlyMode ( $write_only )
setCommentMode ( mixed $comment_mode = false ) : void setCommentMode 註解模式,會在 partial 前面顯示他是哪個 partial
setMinifyMode ( boolean $minify_mode = false ) : void setMinifyMode 是否要啟動 Minify mode,把換行與不必要的空白都拿掉
setNoCache ( boolean $nocache = false ) : void setNoCache 是否不啟動 cache (預設啟動)
setPath ( string $path ) : void setPath 將 Partial 自動讀取路徑設定為 $path
setTrimMode ( boolean $trim_mode = false ) : void setTrimMode 是否要啟動 Trim mode ,預設把每一行的前後空白拿掉

Method Details

__call() public method

public __call ( $func, $args )

__construct() public method

__construct 建出一個 Pix_Partial ,並且將路徑設定成 $path
public __construct ( string | null $path = null, array $options = [] ) : void
$path string | null
$options array cache_prefix cache_id 要加入的字串
return void

__get() public method

public __get ( $k )

__isset() public method

public __isset ( $k )

__set() public method

public __set ( $k, $v )

addCommonHelpers() public static method

addCommonHelpers add common helpers
public static addCommonHelpers ( ) : void
return void

addHelper() public static method

addHelper add static helper in Pix_Controller
public static addHelper ( string $helper, array $methods = null, array $options = [] ) : void
$helper string Helper name
$methods array
$options array
return void

breakRender() public method

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

escape() public method

public escape ( $var )

getCommentMode() public static method

public static getCommentMode ( )

getHelperManager() public static method

getHelperManager get Helper Manager
public static getHelperManager ( ) : Pix_Helper_Manager
return Pix_Helper_Manager

getMinifyMode() public static method

getMinifyMode 取得 Minify Mode 是否開啟
public static getMinifyMode ( ) : boolean
return boolean

getNoCache() public static method

getNoCache 取得 nocache 是否開啟
public static getNoCache ( ) : boolean
return boolean

getPath() public method

getPath 取出 Partial 的 path
public getPath ( ) : void
return void

getTrimMode() public static method

getTrimMode 取得 Trim Mode 是否開啟
public static getTrimMode ( ) : boolean
return boolean

noRender() public method

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

partial() public method

partial 印出 $file 的內容,並且將 $data 的參數轉成 $this
public partial ( string $file, array | Pix_Partial | null $data = null, array | string $options = null ) : string
$file string
$data array | Pix_Partial | null 傳進去的參數
$options array | string 設定 或 cache id
return string

setCacheWriteOnlyMode() public static method

public static setCacheWriteOnlyMode ( $write_only )

setCommentMode() public static method

setCommentMode 註解模式,會在 partial 前面顯示他是哪個 partial
public static setCommentMode ( mixed $comment_mode = false ) : void
$comment_mode mixed
return void

setMinifyMode() public static method

setMinifyMode 是否要啟動 Minify mode,把換行與不必要的空白都拿掉
public static setMinifyMode ( boolean $minify_mode = false ) : void
$minify_mode boolean
return void

setNoCache() public static method

setNoCache 是否不啟動 cache (預設啟動)
public static setNoCache ( boolean $nocache = false ) : void
$nocache boolean
return void

setPath() public method

setPath 將 Partial 自動讀取路徑設定為 $path
public setPath ( string $path ) : void
$path string
return void

setTrimMode() public static method

setTrimMode 是否要啟動 Trim mode ,預設把每一行的前後空白拿掉
public static setTrimMode ( boolean $trim_mode = false ) : void
$trim_mode boolean
return void

Property Details

$_cache_prefix public_oe property

public $_cache_prefix

$_comment_mode protected_oe static_oe property

protected static $_comment_mode

$_data public_oe property

public $_data

$_escape public_oe property

public $_escape

$_helper_manager protected_oe static_oe property

Pix_Helper_Manager
protected static $_helper_manager

$_minify_mode protected_oe static_oe property

protected static $_minify_mode

$_nocache protected_oe static_oe property

protected static $_nocache

$_path public_oe property

public $_path

$_trim_mode protected_oe static_oe property

protected static $_trim_mode

$_write_only_mode protected_oe static_oe property

protected static $_write_only_mode

$alert_messages public_oe property

public $alert_messages