ShortenUrl
extends AbstractHelper
in package
View helper for formatting dates and times
Tags
Table of Contents
- $shortener : UrlShortenerInterface
- URL shortener
- __construct() : mixed
- Constructor
- __invoke() : string
- Shorten a URL
Properties
$shortener
URL shortener
protected
UrlShortenerInterface
$shortener
Methods
__construct()
Constructor
public
__construct(UrlShortenerInterface $shortener) : mixed
Parameters
- $shortener : UrlShortenerInterface
-
URL shortener
Return values
mixed —__invoke()
Shorten a URL
public
__invoke(string $url) : string
Parameters
- $url : string
-
URL to shorten