ListShardsResponse.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Copyright (C) Alibaba Cloud Computing
  4. * All rights reserved
  5. */
  6. require_once realpath(dirname(__FILE__) . '/Response.php');
  7. require_once realpath(dirname(__FILE__) . '/Shard.php');
  8. /**
  9. * The response of the GetLog API from log service.
  10. *
  11. * @author log service dev
  12. */
  13. class Aliyun_Log_Models_ListShardsResponse extends Aliyun_Log_Models_Response {
  14. private $shardIds;
  15. /**
  16. * Aliyun_Log_Models_ListShardsResponse constructor
  17. *
  18. * @param array $resp
  19. * GetLogs HTTP response body
  20. * @param array $header
  21. * GetLogs HTTP response header
  22. */
  23. public function __construct($resp, $header) {
  24. parent::__construct ( $header );
  25. foreach($resp as $key=>$value){
  26. var_dump($value);
  27. $this->shardIds[] = $value['shardID'];
  28. $this->shards[] = new Aliyun_Log_Models_Shard($value['shardID'],$value["status"],$value["inclusiveBeginKey"],$value["exclusiveEndKey"],$value["createTime"]);
  29. }
  30. }
  31. public function getShardIds(){
  32. return $this->shardIds;
  33. }
  34. public function getShards()
  35. {
  36. return $this -> shards;
  37. }
  38. }