original_string: private function init()
      {
          if ($this->encoder === null) {
              // Send the adapter config as JSON payload to the host
              $config = new AdapterConfig(
                  $this->codec->getName(),
                  $this->getAdapterType(),
                  $this->getExtraConfig()
              );
              Codecs::json()->newEncoder($this->output)->useNewlines(false)->encode($config);
  
              // Set up encoder / decoder for further communication
              $this->decoder = $this->codec->newDecoder($this->input);
              $this->encoder = $this->codec->newEncoder($this->output);
          }
      }
code: private function init()
      {
          if ($this->encoder === null) {
              // Send the adapter config as JSON payload to the host
              $config = new AdapterConfig(
                  $this->codec->getName(),
                  $this->getAdapterType(),
                  $this->getExtraConfig()
              );
              Codecs::json()->newEncoder($this->output)->useNewlines(false)->encode($config);
  
              // Set up encoder / decoder for further communication
              $this->decoder = $this->codec->newDecoder($this->input);
              $this->encoder = $this->codec->newEncoder($this->output);
          }
      }
code_tokens: private function init ( ) { if ( $ this -> encoder === null ) { // Send the adapter config as JSON payload to the host $ config = new AdapterConfig ( $ this -> codec -> getName ( ) , $ this -> getAdapterType ( ) , $ this -> getExtraConfig ( ) ) ; Codecs :: json ( ) -> newEncoder ( $ this -> output ) -> useNewlines ( false ) -> encode ( $ config ) ; // Set up encoder / decoder for further communication $ this -> decoder = $ this -> codec -> newDecoder ( $ this -> input ) ; $ this -> encoder = $ this -> codec -> newEncoder ( $ this -> output ) ; } }
docstring: Prepare this adapter for communication. Will send the adapter configuration to the nervus host and set up an
  encoder and decoder for further communication.
docstring_tokens: Prepare this adapter for communication . Will send the adapter configuration to the nervus host and set up an encoder and decoder for further communication .