getUsername() public method

Returns the username of the user.
public getUsername ( ) : string
return string
コード例 #1
0
ファイル: Request.php プロジェクト: Bittarman/phergie
 /**
  * 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);
 }
コード例 #2
0
ファイル: HostmaskTest.php プロジェクト: rdohms/phergie
 /**
  * Tests setUsername() function for correctly setting username property.
  * 
  * @return void
  */
 public function testSetUsername()
 {
     $this->hostmask->setUsername('newusername');
     $this->assertEquals('newusername', $this->hostmask->getUsername());
 }