![]() |
TeamSpeak 3 PHP Framework
1.1.23
Copyright © Planet TeamSpeak. All rights reserved.
|
Helper class for data conversion. More...
Static Public Member Functions | |
| static | bytes ($bytes) |
| Converts bytes to a human readable value. More... | |
| static | seconds ($seconds, $is_ms=FALSE, $format="%dD %02d:%02d:%02d") |
| Converts seconds/milliseconds to a human readable value. More... | |
| static | codec ($codec) |
| Converts a given codec ID to a human readable name. More... | |
| static | groupType ($type) |
| Converts a given group type ID to a human readable name. More... | |
| static | permissionType ($type) |
| Converts a given permission type ID to a human readable name. More... | |
| static | permissionCategory ($pcat) |
| Converts a given permission category value to a human readable name. More... | |
| static | logLevel ($level) |
| Converts a given log level ID to a human readable name and vice versa. More... | |
| static | logEntry ($entry) |
| Converts a specified log entry string into an array containing the data. More... | |
| static | password ($plain) |
| Converts a given string to a ServerQuery password hash. More... | |
| static | version ($version, $format="Y-m-d h:i:s") |
| Returns a client-like formatted version of the TeamSpeak 3 version string. More... | |
| static | versionShort ($version) |
| Returns a client-like short-formatted version of the TeamSpeak 3 version string. More... | |
| static | imageMimeType ($binary) |
| Tries to detect the type of an image by a given string and returns it. More... | |
Helper class for data conversion.
Definition at line 32 of file Convert.php.
|
static |
Converts bytes to a human readable value.
| integer | $bytes |
Definition at line 40 of file Convert.php.
Referenced by TeamSpeak3_Node_Abstract\getInfo().
|
static |
Converts seconds/milliseconds to a human readable value.
| integer | $seconds | |
| boolean | $is_ms | |
| string | $format |
Definition at line 67 of file Convert.php.
Referenced by TeamSpeak3_Viewer_Html\getCorpusTitle(), and TeamSpeak3_Node_Abstract\getInfo().
|
static |
Converts a given codec ID to a human readable name.
| integer | $codec |
Definition at line 80 of file Convert.php.
References TeamSpeak3\CODEC_CELT_MONO, TeamSpeak3\CODEC_OPUS_MUSIC, TeamSpeak3\CODEC_OPUS_VOICE, TeamSpeak3\CODEC_SPEEX_NARROWBAND, TeamSpeak3\CODEC_SPEEX_ULTRAWIDEBAND, and TeamSpeak3\CODEC_SPEEX_WIDEBAND.
Referenced by TeamSpeak3_Viewer_Html\getCorpusTitle().
|
static |
Converts a given group type ID to a human readable name.
| integer | $type |
Definition at line 104 of file Convert.php.
References TeamSpeak3\GROUP_DBTYPE_REGULAR, TeamSpeak3\GROUP_DBTYPE_SERVERQUERY, and TeamSpeak3\GROUP_DBTYPE_TEMPLATE.
Referenced by TeamSpeak3_Viewer_Html\getCorpusTitle().
|
static |
Converts a given permission type ID to a human readable name.
| integer | $type |
Definition at line 122 of file Convert.php.
References TeamSpeak3\PERM_TYPE_CHANNEL, TeamSpeak3\PERM_TYPE_CHANNELCLIENT, TeamSpeak3\PERM_TYPE_CHANNELGROUP, TeamSpeak3\PERM_TYPE_CLIENT, and TeamSpeak3\PERM_TYPE_SERVERGROUP.
|
static |
Converts a given permission category value to a human readable name.
| integer | $pcat |
Definition at line 144 of file Convert.php.
References TeamSpeak3\PERM_CAT_CHANNEL, TeamSpeak3\PERM_CAT_CHANNEL_ACCESS, TeamSpeak3\PERM_CAT_CHANNEL_CREATE, TeamSpeak3\PERM_CAT_CHANNEL_DELETE, TeamSpeak3\PERM_CAT_CHANNEL_INFORMATION, TeamSpeak3\PERM_CAT_CHANNEL_MODIFY, TeamSpeak3\PERM_CAT_CLIENT, TeamSpeak3\PERM_CAT_CLIENT_ADM_ACTIONS, TeamSpeak3\PERM_CAT_CLIENT_BASICS, TeamSpeak3\PERM_CAT_CLIENT_INFORMATION, TeamSpeak3\PERM_CAT_CLIENT_MODIFY, TeamSpeak3\PERM_CAT_FILETRANSFER, TeamSpeak3\PERM_CAT_GLOBAL, TeamSpeak3\PERM_CAT_GLOBAL_ADM_ACTIONS, TeamSpeak3\PERM_CAT_GLOBAL_INFORMATION, TeamSpeak3\PERM_CAT_GLOBAL_SERVER_MGMT, TeamSpeak3\PERM_CAT_GLOBAL_SETTINGS, TeamSpeak3\PERM_CAT_GROUP, TeamSpeak3\PERM_CAT_GROUP_CREATE, TeamSpeak3\PERM_CAT_GROUP_DELETE, TeamSpeak3\PERM_CAT_GROUP_INFORMATION, TeamSpeak3\PERM_CAT_GROUP_MODIFY, TeamSpeak3\PERM_CAT_NEEDED_MODIFY_POWER, TeamSpeak3\PERM_CAT_SERVER, TeamSpeak3\PERM_CAT_SERVER_ADM_ACTIONS, TeamSpeak3\PERM_CAT_SERVER_INFORMATION, and TeamSpeak3\PERM_CAT_SERVER_SETTINGS.
Referenced by TeamSpeak3_Node_Host\permissionTree().
|
static |
Converts a given log level ID to a human readable name and vice versa.
| mixed | $level |
Definition at line 210 of file Convert.php.
References TeamSpeak3\LOGLEVEL_CRITICAL, TeamSpeak3\LOGLEVEL_DEBUG, TeamSpeak3\LOGLEVEL_DEVEL, TeamSpeak3\LOGLEVEL_ERROR, TeamSpeak3\LOGLEVEL_INFO, and TeamSpeak3\LOGLEVEL_WARNING.
|
static |
Converts a specified log entry string into an array containing the data.
| string | $entry |
Definition at line 250 of file Convert.php.
References TeamSpeak3_Helper_String\factory(), and TeamSpeak3\LOGLEVEL_ERROR.
|
static |
Converts a given string to a ServerQuery password hash.
| string | $plain |
Definition at line 285 of file Convert.php.
|
static |
Returns a client-like formatted version of the TeamSpeak 3 version string.
| string | $version | |
| string | $format |
Definition at line 297 of file Convert.php.
Referenced by TeamSpeak3_Node_Abstract\getInfo().
|
static |
Returns a client-like short-formatted version of the TeamSpeak 3 version string.
| string | $version |
Definition at line 315 of file Convert.php.
Referenced by TeamSpeak3_Viewer_Html\getCorpusTitle().
|
static |
Tries to detect the type of an image by a given string and returns it.
| string | $binary |
Definition at line 331 of file Convert.php.
Referenced by TeamSpeak3_Viewer_Html\getSuffixIconChannel(), TeamSpeak3_Viewer_Html\getSuffixIconClient(), and TeamSpeak3_Viewer_Html\getSuffixIconServer().