PHP Class LiquidStandardFilters, php-liquid

Mostrar archivo Open project: harrydeluxe/php-liquid

Public Methods

Method 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 method

Append characters to a string
public static append ( $input, $append ) : string
return string

capitalize() public static method

Capitalize words in the input sentence
public static capitalize ( string $input ) : string
$input string
return string

date() public static method

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

divided_by() public static method

division
public static divided_by ( float $input, float $operand ) : float
$input float
$operand float
return float

downcase() public static method

Convert an input to lowercase
public static downcase ( string $input ) : string
$input string
return string

escape() public static method

Escape a string
public static escape ( string $input ) : string
$input string
return string

first() public static method

Returns the first element of an array
public static first ( array $input ) : mixed
$input array
return mixed

join() public static method

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

last() public static method

Returns the last element of an array
public static last ( array $input ) : mixed
$input array
return mixed

minus() public static method

subtraction
public static minus ( float $input, float $operand ) : float
$input float
$operand float
return float

modulo() public static method

modulo
public static modulo ( integer $input, integer $operand ) : integer
$input integer
$operand integer
return integer

newline_to_br() public static method

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

plus() public static method

addition
public static plus ( float $input, float $operand ) : float
$input float
$operand float
return float

prepend() public static method

Prepend characters to a string
public static prepend ( $input, $prepend ) : string
return string

remove() public static method

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

remove_first() public static method

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

replace() public static method

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

replace_first() public static method

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
return string

size() public static method

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

split() public static method

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

strip_html() public static method

Removes html tags from text
public static strip_html ( string $input ) : string
$input string
return string

strip_newlines() public static method

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

times() public static method

multiplication
public static times ( float $input, float $operand ) : float
$input float
$operand float
return float

truncate() public static method

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

truncatewords() public static method

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

upcase() public static method

Convert an input to uppercase
public static upcase ( string $input ) : string
$input string
return string