Fabiang\Xmpp\Options::setUsername PHP Method

setUsername() public method

Set username.
public setUsername ( string $username )
$username string
    public function setUsername($username)
    {
        $this->username = (string) $username;
        return $this;
    }

Usage Example

Beispiel #1
0
 /**
  * Get Jabber client
  *
  * @access public
  * @return \Fabiang\Xmpp\Client
  */
 public function getClient()
 {
     $options = new Options($this->config->get('jabber_server'));
     $options->setUsername($this->config->get('jabber_username'));
     $options->setPassword($this->config->get('jabber_password'));
     $options->setTo($this->config->get('jabber_domain'));
     $options->setLogger($this->logger);
     return new Client($options);
 }
All Usage Examples Of Fabiang\Xmpp\Options::setUsername