PHP Class Timber\Twig

Datei anzeigen Open project: jarednova/timber Class Usage Examples

Public Properties

Property Type Description
$dir_name

Public Methods

Method Description
__construct ( )
add_list_separators ( array $arr, string $first_delimiter = ',', string $second_delimiter = 'and' ) : string
add_timber_escapers ( Twig_Environment $twig ) : Twig_Environment
add_timber_filters ( Twig_Environment $twig ) : Twig_Environment
convert_pre_entities ( array $matches ) : string
exec_function ( string $function_name ) : mixed
init ( )
intl_date ( string $date, string $format = null ) : string
time_ago ( integer | string $from, integer | string $to = null, string $format_past = '%s ago', string $format_future = '%s from now' ) : string
to_array ( mixed $arr ) : array
twig_pretags ( string $content ) : string

Method Details

__construct() public method

public __construct ( )

add_list_separators() public method

public add_list_separators ( array $arr, string $first_delimiter = ',', string $second_delimiter = 'and' ) : string
$arr array
$first_delimiter string
$second_delimiter string
return string

add_timber_escapers() public method

public add_timber_escapers ( Twig_Environment $twig ) : Twig_Environment
$twig Twig_Environment
return Twig_Environment

add_timber_filters() public method

public add_timber_filters ( Twig_Environment $twig ) : Twig_Environment
$twig Twig_Environment
return Twig_Environment

convert_pre_entities() public method

public convert_pre_entities ( array $matches ) : string
$matches array
return string

exec_function() public method

public exec_function ( string $function_name ) : mixed
$function_name string
return mixed

init() public static method

public static init ( )

intl_date() public method

public intl_date ( string $date, string $format = null ) : string
$date string
$format string (optional)
return string

time_ago() public method

public time_ago ( integer | string $from, integer | string $to = null, string $format_past = '%s ago', string $format_future = '%s from now' ) : string
$from integer | string
$to integer | string
$format_past string
$format_future string
return string

to_array() public method

public to_array ( mixed $arr ) : array
$arr mixed
return array

twig_pretags() public method

public twig_pretags ( string $content ) : string
$content string
return string

Property Details

$dir_name public_oe static_oe property

public static $dir_name