PHP 클래스 PodsView, pods

파일 보기 프로젝트 열기: pods-framework/pods 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$cache_modes array Array of available cache modes

공개 메소드들

메소드 설명
clear ( string | boolean $key = true, string $cache_mode = null, string $group = '' ) : boolean
expires ( array | boolean | integer $expires, string $cache_mode = 'cache' ) : boolean | integer Advanced $expires handling
get ( string $key, string $cache_mode = 'cache', string $group = '', string $callback = null ) : boolean | mixed | null | void
get_key ( string $key, string $group_key = '' ) : string Get the cache key, salted with current Pods version, peppered with md5 if too long
get_template_part ( $_view, null | array $_data = null ) : boolean | mixed | string | void
set ( string $key, mixed $value, integer $expires, string $cache_mode = null, string $group = '' ) : boolean | mixed | null | string | void
view ( string $view, array | null $data = null, boolean | integer | array $expires = false, string $cache_mode = 'cache' ) : boolean | mixed | null | string | void

비공개 메소드들

메소드 설명
__construct ( ) : PodsView
locate_template ( $_view ) : boolean | mixed | string | void

메소드 상세

clear() 공개 정적인 메소드

부터: 2.0
public static clear ( string | boolean $key = true, string $cache_mode = null, string $group = '' ) : boolean
$key string | boolean Key for the cache
$cache_mode string (optional) Decides the caching method to use for the view.
$group string (optional) Set the group.
리턴 boolean

expires() 공개 정적인 메소드

Advanced $expires handling
부터: 3.0
public static expires ( array | boolean | integer $expires, string $cache_mode = 'cache' ) : boolean | integer
$expires array | boolean | integer
$cache_mode string
리턴 boolean | integer

get() 공개 정적인 메소드

부터: 2.0
public static get ( string $key, string $cache_mode = 'cache', string $group = '', string $callback = null ) : boolean | mixed | null | void
$key string Key for the cache
$cache_mode string (optional) Decides the caching method to use for the view.
$group string (optional) Set the group of the value.
$callback string (optional) Callback function to run to set the value if not cached.
리턴 boolean | mixed | null | void

get_key() 공개 정적인 메소드

Get the cache key, salted with current Pods version, peppered with md5 if too long
부터: 2.6.2
public static get_key ( string $key, string $group_key = '' ) : string
$key string
$group_key string
리턴 string

get_template_part() 공개 정적인 메소드

public static get_template_part ( $_view, null | array $_data = null ) : boolean | mixed | string | void
$_view
$_data null | array
리턴 boolean | mixed | string | void

set() 공개 정적인 메소드

부터: 2.0
public static set ( string $key, mixed $value, integer $expires, string $cache_mode = null, string $group = '' ) : boolean | mixed | null | string | void
$key string Key for the cache
$value mixed Value to add to the cache
$expires integer (optional) Time in seconds for the cache to expire, if 0 no expiration.
$cache_mode string (optional) Decides the caching method to use for the view.
$group string (optional) Set the group of the value.
리턴 boolean | mixed | null | string | void

view() 공개 정적인 메소드

부터: 2.0
public static view ( string $view, array | null $data = null, boolean | integer | array $expires = false, string $cache_mode = 'cache' ) : boolean | mixed | null | string | void
$view string Path of the view file
$data array | null (optional) Data to pass on to the template
$expires boolean | integer | array (optional) Time in seconds for the cache to expire, if 0 no expiration.
$cache_mode string (optional) Decides the caching method to use for the view.
리턴 boolean | mixed | null | string | void

프로퍼티 상세

$cache_modes 정적으로 공개적으로 프로퍼티

Array of available cache modes
static public array $cache_modes
리턴 array