V2 Subform - get fields

V2 Subform - get fields

In the Version 2 API PHPSDK, how does one access the fields of a subform?

I have this:
 if( 'subform' == $field['dataType'] ){
      $apiName = $field->getApiName();
      $submoduleIns=$rest->getModule($apiName)->getData();
...//how do I get the fields of this subform?.
}