Fabiang\Xmpp\Options::getImplementation PHP 메소드

getImplementation() 공개 메소드

Get protocol implementation.
public getImplementation ( ) : Fabiang\Xmpp\Protocol\ImplementationInterface
리턴 Fabiang\Xmpp\Protocol\ImplementationInterface
    public function getImplementation()
    {
        if (null === $this->implementation) {
            $this->setImplementation(new DefaultImplementation());
        }
        return $this->implementation;
    }

Usage Example

예제 #1
0
파일: Client.php 프로젝트: flecointre/xmpp
 /**
  * Setup implementation.
  *
  * @return void
  */
 protected function setupImplementation()
 {
     $this->connection->setEventManager($this->eventManager);
     $this->connection->setOptions($this->options);
     $implementation = $this->options->getImplementation();
     $implementation->setEventManager($this->eventManager);
     $implementation->setOptions($this->options);
     $implementation->register();
     $implementation->registerListener(new Logger());
 }