escaping utility methods
This commit is contained in:
@ -68,7 +68,7 @@ class Player {
|
||||
* Construct a new Player
|
||||
*
|
||||
* @param ManiaControl $maniaControl
|
||||
* @param bool $connected
|
||||
* @param bool $connected
|
||||
*/
|
||||
public function __construct(ManiaControl $maniaControl, $connected) {
|
||||
$this->maniaControl = $maniaControl;
|
||||
@ -78,6 +78,19 @@ class Player {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Escaped Nickname
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEscapedNickname() {
|
||||
$nickname = $this->nickname;
|
||||
if (!$nickname) {
|
||||
$nickname = $this->login;
|
||||
}
|
||||
return Formatter::escapeText($nickname);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update from ManiaPlanet PlayerInfo structure
|
||||
*
|
||||
|
Reference in New Issue
Block a user