Documentation

AbstractUid
in package
implements JsonSerializable

AbstractYes
Tags
author

Nicolas Grekas p@tchwork.com

Table of Contents

Interfaces

JsonSerializable

Properties

$uid  : mixed
The identifier in its canonic representation.

Methods

__toString()  : string
compare()  : int
equals()  : bool
Returns whether the argument is an AbstractUid and contains the same value as the current instance.
fromBase32()  : static
fromBase58()  : static
fromBinary()  : static
fromRfc4122()  : static
fromString()  : static
Creates an AbstractUid from an identifier represented in any of the supported formats.
isValid()  : bool
Whether the passed value is valid for the constructor of the current class.
jsonSerialize()  : string
toBase32()  : string
Returns the identifier as a base32 case insensitive string.
toBase58()  : string
Returns the identifier as a base58 case sensitive string.
toBinary()  : string
Returns the identifier as a raw binary string.
toRfc4122()  : string
Returns the identifier as a RFC4122 case insensitive string.

Properties

$uid

The identifier in its canonic representation.

protected mixed $uid

Methods

__toString()

public __toString() : string
Return values
string

compare()

public compare(self $other) : int
Parameters
$other : self
Return values
int

equals()

Returns whether the argument is an AbstractUid and contains the same value as the current instance.

public equals(mixed $other) : bool
Parameters
$other : mixed
Return values
bool

fromBase32()

public static fromBase32(string $uid) : static
Parameters
$uid : string
Tags
throws
InvalidArgumentException

When the passed value is not valid

Return values
static

fromBase58()

public static fromBase58(string $uid) : static
Parameters
$uid : string
Tags
throws
InvalidArgumentException

When the passed value is not valid

Return values
static

fromBinary()

public static fromBinary(string $uid) : static
Parameters
$uid : string
Tags
throws
InvalidArgumentException

When the passed value is not valid

Return values
static

fromRfc4122()

public static fromRfc4122(string $uid) : static
Parameters
$uid : string
Tags
throws
InvalidArgumentException

When the passed value is not valid

Return values
static

fromString()

Creates an AbstractUid from an identifier represented in any of the supported formats.

public abstract static fromString(string $uid) : static
Parameters
$uid : string
Tags
throws
InvalidArgumentException

When the passed value is not valid

Return values
static

isValid()

Whether the passed value is valid for the constructor of the current class.

public abstract static isValid(string $uid) : bool
Parameters
$uid : string
Return values
bool

jsonSerialize()

public jsonSerialize() : string
Return values
string

toBase32()

Returns the identifier as a base32 case insensitive string.

public toBase32() : string
Return values
string

toBase58()

Returns the identifier as a base58 case sensitive string.

public toBase58() : string
Return values
string

toBinary()

Returns the identifier as a raw binary string.

public abstract toBinary() : string
Return values
string

toRfc4122()

Returns the identifier as a RFC4122 case insensitive string.

public toRfc4122() : string
Return values
string

        
On this page

Search results