getUsername() public méthode

Returns the username of the user.
public getUsername ( ) : string
Résultat string
Exemple #1
0
 /**
  * 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);
 }
Exemple #2
0
 /**
  * Tests setUsername() function for correctly setting username property.
  * 
  * @return void
  */
 public function testSetUsername()
 {
     $this->hostmask->setUsername('newusername');
     $this->assertEquals('newusername', $this->hostmask->getUsername());
 }