original_string: function get($path, &$buffer, $fp = null) {
          $this->_path = $this->translate_uri($path);
          $this->header_unset();
          $this->create_basic_request('GET');
          $this->send_request();
          $this->get_respond($fp);
          $response = $this->process_respond();
  
          $http_version = $response['status']['http-version'];
          // validate the response
          // check http-version
          if ($http_version == 'HTTP/1.1' || $http_version == 'HTTP/1.0') {
                  // seems to be http ... proceed
                  // We expect a 200 code
                  if ($response['status']['status-code'] == 200 ) {
                      if (!is_null($fp)) {
                          $stat = fstat($fp);
                          $this->_error_log('file created with ' . $stat['size'] . ' bytes.');
                      } else {
                          $this->_error_log('returning buffer with ' . strlen($response['body']) . ' bytes.');
                          $buffer = $response['body'];
                      }
                  }
                  return $response['status']['status-code'];
              }
          // ups: no http status was returned ?
          return false;
      }
code: function get($path, &$buffer, $fp = null) {
          $this->_path = $this->translate_uri($path);
          $this->header_unset();
          $this->create_basic_request('GET');
          $this->send_request();
          $this->get_respond($fp);
          $response = $this->process_respond();
  
          $http_version = $response['status']['http-version'];
          // validate the response
          // check http-version
          if ($http_version == 'HTTP/1.1' || $http_version == 'HTTP/1.0') {
                  // seems to be http ... proceed
                  // We expect a 200 code
                  if ($response['status']['status-code'] == 200 ) {
                      if (!is_null($fp)) {
                          $stat = fstat($fp);
                          $this->_error_log('file created with ' . $stat['size'] . ' bytes.');
                      } else {
                          $this->_error_log('returning buffer with ' . strlen($response['body']) . ' bytes.');
                          $buffer = $response['body'];
                      }
                  }
                  return $response['status']['status-code'];
              }
          // ups: no http status was returned ?
          return false;
      }
code_tokens: function get ( $ path , & $ buffer , $ fp = null ) { $ this -> _path = $ this -> translate_uri ( $ path ) ; $ this -> header_unset ( ) ; $ this -> create_basic_request ( 'GET' ) ; $ this -> send_request ( ) ; $ this -> get_respond ( $ fp ) ; $ response = $ this -> process_respond ( ) ; $ http_version = $ response [ 'status' ] [ 'http-version' ] ; // validate the response // check http-version if ( $ http_version == 'HTTP/1.1' || $ http_version == 'HTTP/1.0' ) { // seems to be http ... proceed // We expect a 200 code if ( $ response [ 'status' ] [ 'status-code' ] == 200 ) { if ( ! is_null ( $ fp ) ) { $ stat = fstat ( $ fp ) ; $ this -> _error_log ( 'file created with ' . $ stat [ 'size' ] . ' bytes.' ) ; } else { $ this -> _error_log ( 'returning buffer with ' . strlen ( $ response [ 'body' ] ) . ' bytes.' ) ; $ buffer = $ response [ 'body' ] ; } } return $ response [ 'status' ] [ 'status-code' ] ; } // ups: no http status was returned ? return false ; }
docstring: Public method get
  
  Gets a file from a webdav collection.
  @param string $path the path to the file on the webdav server
  @param string &$buffer the buffer to store the data in
  @param resource $fp optional if included, the data is written directly to this resource and not to the buffer
  @return string|bool status code and &$buffer (by reference) with response data from server on success. False on error.
docstring_tokens: Public method get