Fabiang\Xmpp\Options::setTo PHP Method

setTo() public method

This value is send to the server in requests as to="" attribute.
public setTo ( string $to )
$to string
    public function setTo($to)
    {
        $this->to = (string) $to;
        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::setTo