PHP Class Timber\Loader

Afficher le fichier Open project: timber/timber Class Usage Examples

Méthodes publiques

Свойство Type Description
$cache_modes

Protected Properties

Свойство Type Description
$cache_mode
$locations

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
delete_cache ( )
template_exists ( string $file ) : boolean

Private Methods

Méthode Description
_get_cache_extension ( ) : Extension
_get_cache_mode ( string $cache_mode ) : string

Method Details

__construct() public méthode

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

choose_template() public méthode

public choose_template ( array $filenames ) : boolean
$filenames array
Résultat boolean

clear_cache_timber() public méthode

public clear_cache_timber ( $cache_mode = self::CACHE_USE_DEFAULT )

clear_cache_twig() public méthode

public clear_cache_twig ( )

delete_cache() protected méthode

protected delete_cache ( )

get_cache() public méthode

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

get_loader() public méthode

public get_loader ( ) : Twig_Loader_Filesystem
Résultat Twig_Loader_Filesystem

get_twig() public méthode

public get_twig ( ) : Twig_Environment
Résultat Twig_Environment

render() public méthode

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
Résultat boolean | string

rrmdir() public static méthode

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

set_cache() public méthode

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
Résultat string | boolean

template_exists() protected méthode

protected template_exists ( string $file ) : boolean
$file string
Résultat 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