Useful functions to convert SteamIDs.
More...
Useful functions to convert SteamIDs.
There are several representations for steam IDs.
They are the following:
Name | Example | Regex | Supports clans |
steamID | STEAM_1:1:31739929 | ^STEAM_(\d):(\d):(\d*)$ | no (individual user by default) |
steamID3(2) | [U:1:63479859] | ^\[(U\|g):1:(\d*)\]$ | yes |
steamID64 | 76561198023745587 | ^\d{17,18}$ | yes |
Reference: https://developer.valvesoftware.com/wiki/SteamID
- Author
- Daniel Silva mail@.nosp@m.dann.nosp@m.yps.n.nosp@m.et
◆ __construct()
Dannyps\Steam\SteamID::__construct |
( |
|
$id | ) |
|
- Parameters
-
$id | a steamID in any of the three formats supported. |
- Exceptions
-
◆ getSteamID()
Dannyps\Steam\SteamID::getSteamID |
( |
| ) |
|
- Returns
- the steamID for the current steamID.
- Warning
- If the current steamID belongs to a group, this will fail.
- Exceptions
-
-2 | the current steamID belongs to a group, as it cannot be represented in this format. |
◆ getSteamID3()
Dannyps\Steam\SteamID::getSteamID3 |
( |
| ) |
|
- Returns
- the steamID3 for the current steamID.
◆ getSteamID64()
Dannyps\Steam\SteamID::getSteamID64 |
( |
| ) |
|
- Returns
- the steamID64 for the current steamID.
◆ isGroup()
Dannyps\Steam\SteamID::isGroup |
( |
| ) |
|
- Returns
- true if the SteamID represents a group, false otherwise (a user).
◆ isUser()
Dannyps\Steam\SteamID::isUser |
( |
| ) |
|
- Returns
- true if the SteamID represents a user, false otherwise (a group).
◆ isUserBySteamID64()
Dannyps\Steam\SteamID::isUserBySteamID64 |
( |
|
$w | ) |
|
|
private |
determines whether the passed steamID64 belongs to a user or a group.
- Returns
- true if user, false otherwise.
◆ $steamID
Dannyps\Steam\SteamID::$steamID |
|
protected |
The internal representation is the SteamID64.
◆ $user
Dannyps\Steam\SteamID::$user |
|
private |
true if the SteamID represents a user, false otherwise (a group).
The documentation for this class was generated from the following file: