Fabiang\Xmpp\Options::setPassword PHP Method

setPassword() public method

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

Usage Example

示例#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::setPassword