Returns the username of the user.
public getUsername ( ) : string | ||
return | string |
/** * Returns whether or not the event originated from the server. * * @return TRUE if the event is from the server, FALSE otherwise */ public function isFromServer() { $username = $this->hostmask->getUsername(); return empty($username); }
/** * Tests setUsername() function for correctly setting username property. * * @return void */ public function testSetUsername() { $this->hostmask->setUsername('newusername'); $this->assertEquals('newusername', $this->hostmask->getUsername()); }