Shortlink_Controller
in package
Shortlink
Tags
Table of Contents
Properties
- $_chars : string
- Chars
Methods
- decode() : int
- Converts an alpha numeric string to a number
- encode() : string
- Converts a number to an alpha-numeric string.
Properties
$_chars
Chars
protected
static string
$_chars
= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
Methods
decode()
Converts an alpha numeric string to a number
public
static decode(string $shortlink) : int
Parameters
- $shortlink : string
-
String to decode
Return values
int —Decoded number
encode()
Converts a number to an alpha-numeric string.
public
static encode(int $id) : string
Parameters
- $id : int
-
Number to convert