     1: <?php
     2:
     3: namespace SMSApi\Api\Response;
     4:
     5: /**
     6:  * Class ContactsResponse
     7:  * @package SMSApi\Api\Response
     8:  */
     9: class ContactsResponse extends CountableResponse {
    10:
    11:     /**
    12:      * @var \ArrayObject
    13:      */
    14:     private $list;
    15:
    16:     /**
    17:      * @param $data
    18:      */
    19:     function __construct( $data ) {
    20:         parent::__construct( $data );
    21:
    22:         $this->list = new \ArrayObject();
    23:
    24:         if ( isset( $this->obj->list ) ) {
    25:             foreach ( $this->obj->list as $res ) {
    26:                 $this->list->append( new ContactResponse( $res ) );
    27:             }
    28:         }
    29:     }
    30:
    31:     /**
    32:      * @return \ArrayObject|ContactsResponse[]
    33:      */
    34:     public function getList() {
    35:         return $this->list;
    36:     }
    37:
    38: }
    39: