Method |
Description |
|
cleanSmartQuotes ( string $str ) : string |
Removes smart quotes. |
|
cycle ( $firstValue ) |
Creates a Cycle object whose __toString() method cycles through elements
of an array every time it is called. |
|
h ( mixed $var ) : mixed |
Escapes a value for output in a view template. |
|
highlight ( string $text, string $phrase, string $highlighter = null ) : string |
Highlights a phrase where it is found in the text by surrounding it
like I'm highlighted. |
|
makeBreakable ( string $str ) : string |
Inserts HTML code to allow linebreaks in a string after slashes or
underscores. |
|
pluralize ( integer $count, string $singular, string $plural = null ) |
Pluralizes the $singular word unless $count is one. If $plural
form is not supplied, inflector will be used. |
|
resetCycle ( string $name = 'default' ) |
Resets a cycle so that it starts from the first element the next time
it is called. |
|
truncate ( string $text, integer $length = 30, string $truncateString = '...' ) : string |
If $text is longer than $length, $text will be truncated to the length
of $length and the last three characters will be replaced with the
$truncateString. |
|
truncateMiddle ( string $str, integer $maxLength = 80, string $joiner = '...' ) : string |
Limits a string to a given maximum length in a smarter way than just
using substr(). |
|