-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
528 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace OSS\Result; | ||
|
||
|
||
/** | ||
* Class CallbackResult | ||
* @package OSS\Result | ||
*/ | ||
class CallbackResult extends PutSetDeleteResult | ||
{ | ||
protected function isResponseOk() | ||
{ | ||
$status = $this->rawResponse->status; | ||
if ((int)(intval($status) / 100) == 2 && (int)(intval($status) != 203)) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace OSS\Result; | ||
|
||
|
||
/** | ||
* Class CopyObjectResult | ||
* @package OSS\Result | ||
*/ | ||
class CopyObjectResult extends Result | ||
{ | ||
/** | ||
* @return array() | ||
*/ | ||
protected function parseDataFromResponse() | ||
{ | ||
$body = $this->rawResponse->body; | ||
$xml = simplexml_load_string($body); | ||
$result = array(); | ||
|
||
if (isset($xml->LastModified)) { | ||
$result[] = $xml->LastModified; | ||
} | ||
if (isset($xml->ETag)) { | ||
$result[] = $xml->ETag; | ||
} | ||
|
||
return $result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace OSS\Result; | ||
|
||
|
||
/** | ||
* Class DeleteObjectsResult | ||
* @package OSS\Result | ||
*/ | ||
class DeleteObjectsResult extends Result | ||
{ | ||
/** | ||
* @return array() | ||
*/ | ||
protected function parseDataFromResponse() | ||
{ | ||
$body = $this->rawResponse->body; | ||
$xml = simplexml_load_string($body); | ||
$objects = array(); | ||
|
||
if (isset($xml->Deleted)) { | ||
foreach($xml->Deleted as $deleteKey) | ||
$objects[] = $deleteKey->Key; | ||
} | ||
return $objects; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.