VuFind API Documentation

Base62
in package

Base62 generator

Class to encode and decode numbers using base62

Tags
category

VuFind

author

Cornelius Amzar cornelius.amzar@bsz-bw.de

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

BASE62_ALPHABET  = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
BASE62_BASE  = 62
decode()  : int
Common base62 decoding function.
encode()  : string
Common base62 encoding function.

Constants

BASE62_ALPHABET

public mixed BASE62_ALPHABET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'

BASE62_BASE

public mixed BASE62_BASE = 62

Methods

decode()

Common base62 decoding function.

public decode(string $base62Number) : int

Implemented here so we don't need additional PHP modules like bcmath.

Parameters
$base62Number : string

Number to decode

Tags
throws
Exception
Return values
int

encode()

Common base62 encoding function.

public encode(string $base10Number) : string

Implemented here so we don't need additional PHP modules like bcmath.

Parameters
$base10Number : string

Number to encode

Tags
throws
Exception
Return values
string

Search results