PHP Class LiquidStandardFilters, php-liquid

Afficher le fichier Open project: harrydeluxe/php-liquid

Méthodes publiques

Méthode Description
append ( $input, $append ) : string Append characters to a string
capitalize ( string $input ) : string Capitalize words in the input sentence
date ( mixed $input, string $format ) : string Formats a date using strftime
divided_by ( float $input, float $operand ) : float division
downcase ( string $input ) : string Convert an input to lowercase
escape ( string $input ) : string Escape a string
first ( array $input ) : mixed Returns the first element of an array
join ( array $input, string $glue = ' ' ) : string Joins elements of an array with a given character between them
last ( array $input ) : mixed Returns the last element of an array
minus ( float $input, float $operand ) : float subtraction
modulo ( integer $input, integer $operand ) : integer modulo
newline_to_br ( string $input ) : string Replace each newline (\n) with html break
plus ( float $input, float $operand ) : float addition
prepend ( $input, $prepend ) : string Prepend characters to a string
remove ( string $input, string $find ) : string Remove all occurrences of a string.
remove_first ( string $input, string $find ) : string Remove first occurrence of a string.
replace ( string $input, string $find, string $replace ) : string Replace all occurrences of a string with another.
replace_first ( string $input, string $find, string $replace ) : string Replace first occurrence of a string with another.
size ( mixed $input ) : integer Return the size of an array or of an string
split ( string $input, string $pattern ) : array Split input string into an array of substrings separated by given pattern.
strip_html ( string $input ) : string Removes html tags from text
strip_newlines ( string $input ) : string Strip all newlines (\n, \r) from string
times ( float $input, float $operand ) : float multiplication
truncate ( string $input, integer $characters = 100 ) : string Truncate a string down to x characters
truncatewords ( string $input, integer $words = 3 ) : string Truncate string down to x words
upcase ( string $input ) : string Convert an input to uppercase

Method Details

append() public static méthode

Append characters to a string
public static append ( $input, $append ) : string
Résultat string

capitalize() public static méthode

Capitalize words in the input sentence
public static capitalize ( string $input ) : string
$input string
Résultat string

date() public static méthode

Formats a date using strftime
public static date ( mixed $input, string $format ) : string
$input mixed
$format string
Résultat string

divided_by() public static méthode

division
public static divided_by ( float $input, float $operand ) : float
$input float
$operand float
Résultat float

downcase() public static méthode

Convert an input to lowercase
public static downcase ( string $input ) : string
$input string
Résultat string

escape() public static méthode

Escape a string
public static escape ( string $input ) : string
$input string
Résultat string

first() public static méthode

Returns the first element of an array
public static first ( array $input ) : mixed
$input array
Résultat mixed

join() public static méthode

Joins elements of an array with a given character between them
public static join ( array $input, string $glue = ' ' ) : string
$input array
$glue string
Résultat string

last() public static méthode

Returns the last element of an array
public static last ( array $input ) : mixed
$input array
Résultat mixed

minus() public static méthode

subtraction
public static minus ( float $input, float $operand ) : float
$input float
$operand float
Résultat float

modulo() public static méthode

modulo
public static modulo ( integer $input, integer $operand ) : integer
$input integer
$operand integer
Résultat integer

newline_to_br() public static méthode

Replace each newline (\n) with html break
public static newline_to_br ( string $input ) : string
$input string
Résultat string

plus() public static méthode

addition
public static plus ( float $input, float $operand ) : float
$input float
$operand float
Résultat float

prepend() public static méthode

Prepend characters to a string
public static prepend ( $input, $prepend ) : string
Résultat string

remove() public static méthode

Remove all occurrences of a string.
public static remove ( string $input, string $find ) : string
$input string
$find string
Résultat string

remove_first() public static méthode

Remove first occurrence of a string.
public static remove_first ( string $input, string $find ) : string
$input string
$find string
Résultat string

replace() public static méthode

Replace all occurrences of a string with another.
public static replace ( string $input, string $find, string $replace ) : string
$input string
$find string
$replace string
Résultat string

replace_first() public static méthode

Replace first occurrence of a string with another.
public static replace_first ( string $input, string $find, string $replace ) : string
$input string
$find string
$replace string
Résultat string

size() public static méthode

Return the size of an array or of an string
public static size ( mixed $input ) : integer
$input mixed
Résultat integer

split() public static méthode

Split input string into an array of substrings separated by given pattern.
public static split ( string $input, string $pattern ) : array
$input string
$pattern string
Résultat array

strip_html() public static méthode

Removes html tags from text
public static strip_html ( string $input ) : string
$input string
Résultat string

strip_newlines() public static méthode

Strip all newlines (\n, \r) from string
public static strip_newlines ( string $input ) : string
$input string
Résultat string

times() public static méthode

multiplication
public static times ( float $input, float $operand ) : float
$input float
$operand float
Résultat float

truncate() public static méthode

Truncate a string down to x characters
public static truncate ( string $input, integer $characters = 100 ) : string
$input string
$characters integer
Résultat string

truncatewords() public static méthode

Truncate string down to x words
public static truncatewords ( string $input, integer $words = 3 ) : string
$input string
$words integer
Résultat string

upcase() public static méthode

Convert an input to uppercase
public static upcase ( string $input ) : string
$input string
Résultat string