Methods summary
public static
string
|
#
escapeHtml( mixed $s )
Escapes string for use inside HTML.
Escapes string for use inside HTML.
Parameters
Returns
string HTML
|
public static
string
|
#
escapeHtmlText( mixed $s )
Escapes string for use inside HTML.
Escapes string for use inside HTML.
Parameters
Returns
string HTML
|
public static
string
|
#
escapeHtmlAttr( string $s, $double = true )
Escapes string for use inside HTML attribute value.
Escapes string for use inside HTML attribute value.
Parameters
Returns
string HTML
|
public static
string
|
#
escapeHtmlAttrConv( mixed $s )
Escapes HTML for use inside HTML attribute.
Escapes HTML for use inside HTML attribute.
Parameters
Returns
string HTML
|
public static
string
|
#
escapeHtmlAttrUnquoted( string $s )
Escapes string for use inside HTML attribute name.
Escapes string for use inside HTML attribute name.
Parameters
Returns
string HTML
|
public static
string
|
#
escapeXml( string $s )
Escapes string for use inside XML 1.0 template.
Escapes string for use inside XML 1.0 template.
Parameters
Returns
string XML
|
public static
string
|
#
escapeXmlAttrUnquoted( string $s )
Escapes string for use inside XML attribute name.
Escapes string for use inside XML attribute name.
Parameters
Returns
string XML
|
public static
string
|
#
escapeCss( string $s )
Escapes string for use inside CSS template.
Escapes string for use inside CSS template.
Parameters
Returns
string CSS
|
public static
string
|
#
escapeJs( mixed $s )
Escapes variables for use inside <script>.
Escapes variables for use inside <script>.
Parameters
Returns
string JSON
|
public static
string
|
#
escapeICal( string $s )
Escapes string for use inside iCal template.
Escapes string for use inside iCal template.
Parameters
Returns
string string
|
public static
string
|
#
escapeHtmlRawText( string $s )
Escapes CSS/JS for usage in <script> and <style>..
Escapes CSS/JS for usage in <script> and <style>..
Parameters
Returns
string HTML RAWTEXT
|
public static
string
|
|
public static
string
|
#
stripTags( Latte\Runtime\FilterInfo $info, string $s )
Removes tags from HTML (but remains HTML entites).
Removes tags from HTML (but remains HTML entites).
Parameters
Returns
string HTML
|
public static
string
|
|
public static
callable|null
|
#
getConvertor( $source, $dest )
Returns
callable|null callable|null
|
public static
string
|
#
safeUrl( string $s )
Sanitizes string for use inside href attribute.
Sanitizes string for use inside href attribute.
Parameters
Returns
string plain text
|
public static
string
|
#
strip( Latte\Runtime\FilterInfo $info, string $s )
Replaces all repeated white spaces with a single space.
Replaces all repeated white spaces with a single space.
Parameters
Returns
string text|HTML
|
public static
string
|
#
spacelessHtml( string $s, integer $phase = null, boolean & $strip = true )
Replaces all repeated white spaces with a single space.
Replaces all repeated white spaces with a single space.
Parameters
- $s
- HTML
- $phase
- buffering phase
- $strip
- mode
Returns
string HTML
|
public static
string
|
#
spacelessText( string $s )
Replaces all repeated white spaces with a single space.
Replaces all repeated white spaces with a single space.
Parameters
Returns
string text
|
public static
string
|
#
indent( Latte\Runtime\FilterInfo $info, string $s, integer $level = 1, string $chars = "\t" )
Indents the content from the left.
Indents the content from the left.
Parameters
- $info
- $s
- text|HTML
- $level
- $chars
Returns
string text|HTML
|
public static
string
|
|
public static
string|null
|
|
public static
string
|
#
bytes( float $bytes, integer $precision = 2 )
Converts to human readable file size.
Converts to human readable file size.
Parameters
Returns
string plain text
|
public static
string
|
#
replace( Latte\Runtime\FilterInfo $info, string $subject, string $search, string $replacement = '' )
Performs a search and replace.
Performs a search and replace.
Parameters
- $info
- $subject
- $search
- $replacement
Returns
string string
|
public static
string
|
#
replaceRe( string $subject, string $pattern, $replacement = '' )
Perform a regular expression search and replace.
Perform a regular expression search and replace.
Parameters
- $subject
- $pattern
- $replacement
Returns
string string
|
public static
string
|
#
dataStream( string $data, string $type = null )
The data: URI generator.
Parameters
Returns
string plain text
|
public static
string
|
#
nl2br( string $value )
Parameters
Returns
string string
|
public static
Latte\Runtime\Html
|
|
public static
string
|
#
substring( string $s, integer $start, integer $length = null )
Returns a part of string.
Returns a part of string.
Parameters
Returns
string string
|
public static
string
|
#
truncate( string $s, integer $maxLen, string $append = "\xE2\x80\xA6" )
Truncates string to maximal length.
Truncates string to maximal length.
Parameters
- $s
- text
- $maxLen
- $append
- text
Returns
string plain text
|
public static
string
|
#
lower( string $s )
Convert to lower case.
Parameters
Returns
string plain text
|
public static
string
|
#
upper( string $s )
Convert to upper case.
Parameters
Returns
string plain text
|
public static
string
|
#
firstUpper( string $s )
Convert first character to upper case.
Convert first character to upper case.
Parameters
Returns
string plain text
|
public static
string
|
#
capitalize( string $s )
Capitalize string.
Parameters
Returns
string plain text
|
public static
integer
|
#
length( array|Countable |Traversable |string $val )
Returns length of string or iterable.
Returns length of string or iterable.
Parameters
Returns
integer int
|
public static
string
|
|
public static
string
|
#
padLeft( string $s, integer $length, string $pad = ' ' )
Pad a string to a certain length with another string.
Pad a string to a certain length with another string.
Parameters
Returns
string string
|
public static
string
|
#
padRight( string $s, integer $length, string $pad = ' ' )
Pad a string to a certain length with another string.
Pad a string to a certain length with another string.
Parameters
Returns
string string
|
public static
|
#
reverse( string|array|Traversable $val, $preserveKeys = false )
Reverses string or array.
Reverses string or array.
Parameters
|
public static
string
|
#
htmlAttributes( $attrs )
Returns element's attributes.
Returns element's attributes.
Returns
string string
|