UrlShortenerInterface
in
URL shortener interface.
Tags
Table of Contents
- resolve() : string
- Resolve a shortened URL by its id.
- shorten() : string
- Generate and return shortened version of a URL.
Methods
resolve()
Resolve a shortened URL by its id.
public
resolve(string $id) : string
Parameters
- $id : string
-
ID to resolve
Return values
string —shorten()
Generate and return shortened version of a URL.
public
shorten(string $url) : string
Parameters
- $url : string
-
URL