Html
class Html (View source)
Methods
Trim text to a given length.
Transforms plain text to HTML. Plot twist: text between backticks (`) is wrapped in a element.
Check if a given string looks like it could be a URL, with or without the protocol.
Add 'http://' to a link, if it has no protocol already.
Create 'provider' link, as used in the footer, to link to either an email address or website URL.
No description
Details
static string
trimText(string $str, int $desiredLength, bool $hellip = true, int $cutOffCap = 3)
Trim text to a given length.
static string
decorateTT(string $str)
Transforms plain text to HTML. Plot twist: text between backticks (`) is wrapped in a element.
static bool
isURL(string $str)
Check if a given string looks like it could be a URL, with or without the protocol.
static string
addScheme(string $url, string $scheme = 'http://')
Add 'http://' to a link, if it has no protocol already.
static string
providerLink(array $providedby)
Create 'provider' link, as used in the footer, to link to either an email address or website URL.