original_string: final public function write($xml)
      {
  
          if($xml instanceof \SimpleXMLElement){
              $xml = $xml->asXML();
          } elseif($xml instanceof \DOMDocument){
              $xml = $xml->saveXML();
          }
  
          $this->log("SENT: ".$xml);
  
          return parent::write($xml);
      }
code: final public function write($xml)
      {
  
          if($xml instanceof \SimpleXMLElement){
              $xml = $xml->asXML();
          } elseif($xml instanceof \DOMDocument){
              $xml = $xml->saveXML();
          }
  
          $this->log("SENT: ".$xml);
  
          return parent::write($xml);
      }
code_tokens: final public function write ( $ xml ) { if ( $ xml instanceof \ SimpleXMLElement ) { $ xml = $ xml -> asXML ( ) ; } elseif ( $ xml instanceof \ DOMDocument ) { $ xml = $ xml -> saveXML ( ) ; } $ this -> log ( "SENT: " . $ xml ) ; return parent :: write ( $ xml ) ; }
docstring: Writes XML to the socket client
  @param mixed $xml Can be DOMDocument, SimpleXMLElement or string of XML
  @return <type>
docstring_tokens: Writes XML to the socket client