1: <?php
2:
3: namespace SMSApi\Api\Response;
4:
5: /**
6: * Class CountableResponse
7: * @package SMSApi\Api\Response
8: */
9: class CountableResponse extends AbstractResponse {
10:
11: /**
12: * @var int
13: */
14: protected $count;
15:
16: /**
17: * @param $data
18: */
19: function __construct( $data ) {
20: parent::__construct( $data );
21:
22: $this->count = isset( $this->obj->count ) ? $this->obj->count : 0;
23: }
24:
25: /**
26: * @return int
27: */
28: public function getCount() {
29: return $this->count;
30: }
31:
32: }
33:
34: