Skip to content

Commit

Permalink
Fix Azure#98
Browse files Browse the repository at this point in the history
  • Loading branch information
ogail committed Sep 11, 2012
1 parent 51b497f commit f868d85
Show file tree
Hide file tree
Showing 9 changed files with 346 additions and 141 deletions.
84 changes: 57 additions & 27 deletions WindowsAzure/Blob/Models/ListBlobsResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,36 +75,46 @@ class ListBlobsResult
* @var integer
*/
private $_maxResults;

/**
* @var string
*/
private $_containerName;

/**
* Creates ListBlobsResult object from parsed XML response.
*
* @param array $parsed XML response parsed into array.
*
* @return WindowsAzure\Blob\Models\ListBlobsResult.
* @return ListBlobsResult
*/
public static function create($parsed)
{
$result = new ListBlobsResult();
$result->_prefix = Utilities::tryGetValue(
$result = new ListBlobsResult();
$result->_containerName = Utilities::tryGetKeysChainValue(
$parsed,
Resources::XTAG_ATTRIBUTES,
Resources::XTAG_CONTAINER_NAME
);
$result->_prefix = Utilities::tryGetValue(
$parsed, Resources::QP_PREFIX
);
$result->_marker = Utilities::tryGetValue(
$result->_marker = Utilities::tryGetValue(
$parsed, Resources::QP_MARKER
);
$result->_nextMarker = Utilities::tryGetValue(
$result->_nextMarker = Utilities::tryGetValue(
$parsed, Resources::QP_NEXT_MARKER
);
$result->_maxResults = intval(
$result->_maxResults = intval(
Utilities::tryGetValue($parsed, Resources::QP_MAX_RESULTS, 0)
);
$result->_delimiter = Utilities::tryGetValue(
$result->_delimiter = Utilities::tryGetValue(
$parsed, Resources::QP_DELIMITER
);
$result->_blobs = array();
$result->_blobPrefixes = array();
$rawBlobs = array();
$rawBlobPrefixes = array();
$result->_blobs = array();
$result->_blobPrefixes = array();
$rawBlobs = array();
$rawBlobPrefixes = array();

if ( is_array($parsed['Blobs'])
&& array_key_exists('Blob', $parsed['Blobs'])
Expand Down Expand Up @@ -148,7 +158,7 @@ public static function create($parsed)
/**
* Gets blobs.
*
* @return array.
* @return array
*/
public function getBlobs()
{
Expand All @@ -160,7 +170,7 @@ public function getBlobs()
*
* @param array $blobs list of blobs
*
* @return none.
* @return none
*/
public function setBlobs($blobs)
{
Expand All @@ -173,7 +183,7 @@ public function setBlobs($blobs)
/**
* Gets blobPrefixes.
*
* @return array.
* @return array
*/
public function getBlobPrefixes()
{
Expand All @@ -185,7 +195,7 @@ public function getBlobPrefixes()
*
* @param array $blobPrefixes list of blobPrefixes
*
* @return none.
* @return none
*/
public function setBlobPrefixes($blobPrefixes)
{
Expand All @@ -198,7 +208,7 @@ public function setBlobPrefixes($blobPrefixes)
/**
* Gets prefix.
*
* @return string.
* @return string
*/
public function getPrefix()
{
Expand All @@ -210,7 +220,7 @@ public function getPrefix()
*
* @param string $prefix value.
*
* @return none.
* @return none
*/
public function setPrefix($prefix)
{
Expand All @@ -220,7 +230,7 @@ public function setPrefix($prefix)
/**
* Gets prefix.
*
* @return string.
* @return string
*/
public function getDelimiter()
{
Expand All @@ -232,7 +242,7 @@ public function getDelimiter()
*
* @param string $delimiter value.
*
* @return none.
* @return none
*/
public function setDelimiter($delimiter)
{
Expand All @@ -242,7 +252,7 @@ public function setDelimiter($delimiter)
/**
* Gets marker.
*
* @return string.
* @return string
*/
public function getMarker()
{
Expand All @@ -254,7 +264,7 @@ public function getMarker()
*
* @param string $marker value.
*
* @return none.
* @return none
*/
public function setMarker($marker)
{
Expand All @@ -264,7 +274,7 @@ public function setMarker($marker)
/**
* Gets max results.
*
* @return integer.
* @return integer
*/
public function getMaxResults()
{
Expand All @@ -276,7 +286,7 @@ public function getMaxResults()
*
* @param integer $maxResults value.
*
* @return none.
* @return none
*/
public function setMaxResults($maxResults)
{
Expand All @@ -286,7 +296,7 @@ public function setMaxResults($maxResults)
/**
* Gets next marker.
*
* @return string.
* @return string
*/
public function getNextMarker()
{
Expand All @@ -298,12 +308,32 @@ public function getNextMarker()
*
* @param string $nextMarker value.
*
* @return none.
* @return none
*/
public function setNextMarker($nextMarker)
{
$this->_nextMarker = $nextMarker;
}
}


/**
* Gets container name.
*
* @return string
*/
public function getContainerName()
{
return $this->_containerName;
}

/**
* Sets container name.
*
* @param string $containerName value.
*
* @return none
*/
public function setContainerName($containerName)
{
$this->_containerName = $containerName;
}
}
Loading

0 comments on commit f868d85

Please sign in to comment.