Methods summary
public static
callable
|
#
loader( string $helper )
Try to load the requested helper.
Try to load the requested helper.
Parameters
- $helper
string helper name
Returns
callable
|
public static
string
|
#
escapeHtml( mixed $s, integer $quotes = ENT_QUOTES )
Escapes string for use inside HTML template.
Escapes string for use inside HTML template.
Parameters
- $s
mixed UTF-8 encoding
- $quotes
integer optional attribute quotes
Returns
string
|
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
|
public static
string
|
#
escapeCss( string $s )
Escapes string for use inside CSS template.
Escapes string for use inside CSS template.
Parameters
Returns
string
|
public static
string
|
#
escapeJs( mixed $s )
Escapes variables for use inside <script>.
Escapes variables for use inside <script>.
Parameters
Returns
string
|
public static
string
|
#
escapeICal( mixed $s )
Escapes string for use inside iCal template.
Escapes string for use inside iCal template.
Parameters
Returns
string
|
public static
string
|
#
safeUrl( string $s )
Sanitizes string for use inside href attribute.
Sanitizes string for use inside href attribute.
Parameters
Returns
string
|
public static
string
|
#
strip( string $s )
Replaces all repeated white spaces with a single space.
Replaces all repeated white spaces with a single space.
Parameters
- $s
string UTF-8 encoding or 8-bit
Returns
string
|
public static
string
|
#
indent( string $s, integer $level = 1, string $chars = "\t" )
Indents the HTML content from the left.
Indents the HTML content from the left.
Parameters
- $s
string UTF-8 encoding or 8-bit
- $level
integer
- $chars
string
Returns
string
|
public static
string
|
|
public static
Nette\DateTime
|
#
modifyDate( string|integer|DateTime $time, string|integer $delta, string $unit = NULL )
Date/time modification.
Parameters
- $time
string|integer|DateTime
- $delta
string|integer
- $unit
string
Returns
|
public static
string
|
#
bytes( integer $bytes, integer $precision = 2 )
Converts to human readable file size.
Converts to human readable file size.
Parameters
- $bytes
integer
- $precision
integer
Returns
string
|
public static
integer
|
#
length( mixed $var )
Returns array of string length.
Returns array of string length.
Parameters
Returns
integer
|
public static
string
|
#
replace( string $subject, string $search, string $replacement = '' )
Performs a search and replace.
Performs a search and replace.
Parameters
- $subject
string
- $search
string
- $replacement
string
Returns
string
|
public static
string
|
#
dataStream( string $data, string $type = NULL )
The data: URI generator.
Parameters
- $data
string
- $type
string
Returns
string
|
public static
string
|
#
null( )
/dev/null.
Returns
string
|
public static
string
|
#
nl2br( string $value )
Parameters
Returns
string
|
public static
string
|
#
optimizePhp( string $source, $lineLength = 80, $existenceOfThisParameterSolvesDamnBugInPHP535 = NULL )
Removes unnecessary blocks of PHP code.
Removes unnecessary blocks of PHP code.
Parameters
- $source
string
- $lineLength
- $existenceOfThisParameterSolvesDamnBugInPHP535
Returns
string
|