original_string: function put($path, $data ) {
          $this->_path = $this->translate_uri($path);
          $this->header_unset();
          $this->create_basic_request('PUT');
          // add more needed header information ...
          $this->header_add('Content-length: ' . strlen($data));
          $this->header_add('Content-type: application/octet-stream');
          // send header
          $this->send_request();
          // send the rest (data)
          fputs($this->sock, $data);
          $this->get_respond();
          $response = $this->process_respond();
  
          // validate the response
          // check http-version
          if ($response['status']['http-version'] == 'HTTP/1.1' ||
              $response['status']['http-version'] == 'HTTP/1.0') {
                  // seems to be http ... proceed
                  // We expect a 200 or 204 status code
                  // see rfc 2068 - 9.6 PUT...
                  // print 'http ok<br>';
                  return $response['status']['status-code'];
              }
          // ups: no http status was returned ?
          return false;
      }
code: function put($path, $data ) {
          $this->_path = $this->translate_uri($path);
          $this->header_unset();
          $this->create_basic_request('PUT');
          // add more needed header information ...
          $this->header_add('Content-length: ' . strlen($data));
          $this->header_add('Content-type: application/octet-stream');
          // send header
          $this->send_request();
          // send the rest (data)
          fputs($this->sock, $data);
          $this->get_respond();
          $response = $this->process_respond();
  
          // validate the response
          // check http-version
          if ($response['status']['http-version'] == 'HTTP/1.1' ||
              $response['status']['http-version'] == 'HTTP/1.0') {
                  // seems to be http ... proceed
                  // We expect a 200 or 204 status code
                  // see rfc 2068 - 9.6 PUT...
                  // print 'http ok<br>';
                  return $response['status']['status-code'];
              }
          // ups: no http status was returned ?
          return false;
      }
code_tokens: function put ( $ path , $ data ) { $ this -> _path = $ this -> translate_uri ( $ path ) ; $ this -> header_unset ( ) ; $ this -> create_basic_request ( 'PUT' ) ; // add more needed header information ... $ this -> header_add ( 'Content-length: ' . strlen ( $ data ) ) ; $ this -> header_add ( 'Content-type: application/octet-stream' ) ; // send header $ this -> send_request ( ) ; // send the rest (data) fputs ( $ this -> sock , $ data ) ; $ this -> get_respond ( ) ; $ response = $ this -> process_respond ( ) ; // validate the response // check http-version if ( $ response [ 'status' ] [ 'http-version' ] == 'HTTP/1.1' || $ response [ 'status' ] [ 'http-version' ] == 'HTTP/1.0' ) { // seems to be http ... proceed // We expect a 200 or 204 status code // see rfc 2068 - 9.6 PUT... // print 'http ok<br>'; return $ response [ 'status' ] [ 'status-code' ] ; } // ups: no http status was returned ? return false ; }
docstring: Public method put
  
  Puts a file into a collection.
  Data is putted as one chunk!
  @param string path, string data
  @return int status-code read from webdavserver. False on error.
docstring_tokens: Public method put