Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Make it easier to subclass DAV storage
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Feb 15, 2017
commit 25dc1405116dcbabb1ccf31f75c088e80bd8c6e1
14 changes: 7 additions & 7 deletions lib/private/Files/Storage/DAV.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ class DAV extends Common {
/** @var bool */
protected $ready;
/** @var Client */
private $client;
protected $client;
/** @var ArrayCache */
private $statCache;
protected $statCache;
/** @var \OCP\Http\Client\IClientService */
private $httpClientService;
protected $httpClientService;

/**
* @param array $params
Expand Down Expand Up @@ -127,7 +127,7 @@ public function __construct($params) {
}
}

private function init() {
protected function init() {
if ($this->ready) {
return;
}
Expand Down Expand Up @@ -627,7 +627,7 @@ public function cleanPath($path) {
* @param string $path to encode
* @return string encoded path
*/
private function encodePath($path) {
protected function encodePath($path) {
// slashes need to stay
return str_replace('%2F', '/', rawurlencode($path));
}
Expand All @@ -641,7 +641,7 @@ private function encodePath($path) {
* @throws StorageInvalidException
* @throws StorageNotAvailableException
*/
private function simpleResponse($method, $path, $body, $expected) {
protected function simpleResponse($method, $path, $body, $expected) {
$path = $this->cleanPath($path);
try {
$response = $this->client->request($method, $this->encodePath($path), $body);
Expand Down Expand Up @@ -815,7 +815,7 @@ public function hasUpdated($path, $time) {
* @throws StorageNotAvailableException if the storage is not available,
* which might be temporary
*/
private function convertException(Exception $e, $path = '') {
protected function convertException(Exception $e, $path = '') {
\OC::$server->getLogger()->logException($e);
Util::writeLog('files_external', $e->getMessage(), Util::ERROR);
if ($e instanceof ClientHttpException) {
Expand Down