Метод | Описание | |
---|---|---|
addScheme ( string $url, string $scheme = 'http://' ) : string | Add 'http://' to a link, if it has no protocol already. | |
decorateTT ( string $str ) : string | Transforms plain text to HTML. Plot twist: text between backticks (`) is wrapped in a element. | |
isURL ( string $str ) : boolean | Check if a given string looks like it could be a URL, with or without the protocol. | |
providerLink ( array $providedby ) : string | Create 'provider' link, as used in the footer, to link to either an email address or website URL. | |
trimText ( string $str, integer $desiredLength, boolean $hellip = true, integer $cutOffCap = 10 ) : string | Trim text to a given length. |
public static decorateTT ( string $str ) : string | ||
$str | string | Input string. Treated as plain text. |
Результат | string | The resulting HTML |
public static providerLink ( array $providedby ) : string | ||
$providedby | array | |
Результат | string |
public static trimText ( string $str, integer $desiredLength, boolean $hellip = true, integer $cutOffCap = 10 ) : string | ||
$str | string | String to trim |
$desiredLength | integer | Target string length |
$hellip | boolean | Add dots when the string is too long |
$cutOffCap | integer | Maximum difference between string length when removing words |
Результат | string | Trimmed string |