PHP Class Timber\Loader

ファイルを表示 Open project: timber/timber Class Usage Examples

Public Properties

Property Type Description
$cache_modes

Protected Properties

Property Type Description
$cache_mode
$locations

Public Methods

Method Description
__construct ( boolean | string $caller = false )
choose_template ( array $filenames ) : boolean
clear_cache_timber ( $cache_mode = self::CACHE_USE_DEFAULT )
clear_cache_twig ( )
get_cache ( string $key, string $group = self::CACHEGROUP, string $cache_mode = self::CACHE_USE_DEFAULT ) : boolean
get_loader ( ) : Twig_Loader_Filesystem
get_twig ( ) : Twig_Environment
render ( string $file, array $data = null, array | boolean $expires = false, string $cache_mode = self::CACHE_USE_DEFAULT ) : boolean | string
rrmdir ( string | false $dirPath )
set_cache ( string $key, string | boolean $value, string $group = self::CACHEGROUP, integer $expires, string $cache_mode = self::CACHE_USE_DEFAULT ) : string | boolean

Protected Methods

Method Description
delete_cache ( )
template_exists ( string $file ) : boolean

Private Methods

Method Description
_get_cache_extension ( ) : Extension
_get_cache_mode ( string $cache_mode ) : string

Method Details

__construct() public method

public __construct ( boolean | string $caller = false )
$caller boolean | string the calling directory or false

choose_template() public method

public choose_template ( array $filenames ) : boolean
$filenames array
return boolean

clear_cache_timber() public method

public clear_cache_timber ( $cache_mode = self::CACHE_USE_DEFAULT )

clear_cache_twig() public method

public clear_cache_twig ( )

delete_cache() protected method

protected delete_cache ( )

get_cache() public method

public get_cache ( string $key, string $group = self::CACHEGROUP, string $cache_mode = self::CACHE_USE_DEFAULT ) : boolean
$key string
$group string
$cache_mode string
return boolean

get_loader() public method

public get_loader ( ) : Twig_Loader_Filesystem
return Twig_Loader_Filesystem

get_twig() public method

public get_twig ( ) : Twig_Environment
return Twig_Environment

render() public method

public render ( string $file, array $data = null, array | boolean $expires = false, string $cache_mode = self::CACHE_USE_DEFAULT ) : boolean | string
$file string
$data array
$expires array | boolean (array for options, false for none, integer for # of seconds)
$cache_mode string
return boolean | string

rrmdir() public static method

public static rrmdir ( string | false $dirPath )
$dirPath string | false

set_cache() public method

public set_cache ( string $key, string | boolean $value, string $group = self::CACHEGROUP, integer $expires, string $cache_mode = self::CACHE_USE_DEFAULT ) : string | boolean
$key string
$value string | boolean
$group string
$expires integer
$cache_mode string
return string | boolean

template_exists() protected method

protected template_exists ( string $file ) : boolean
$file string
return boolean

Property Details

$cache_mode protected_oe property

protected $cache_mode

$cache_modes public_oe static_oe property

public static $cache_modes

$locations protected_oe property

protected $locations