Fabiang\Xmpp\Options::setLogger PHP Method

setLogger() public method

Set logger instance.
public setLogger ( Psr\Log\LoggerInterface $logger )
$logger Psr\Log\LoggerInterface PSR-3 Logger
    public function setLogger(LoggerInterface $logger)
    {
        $this->logger = $logger;
        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::setLogger