// Make the get request.
    $locationCriteria = $locationCriterionService->get($selector);
    // Display results.
    if (isset($locationCriteria)) {
        foreach ($locationCriteria as $locationCriterion) {
            if (isset($locationCriterion->location->parentLocations)) {
                $parentLocations = implode(', ', array_map('GetLocationString', $locationCriterion->location->parentLocations));
            } else {
                $parentLocations = 'N/A';
            }
            printf("The search term '%s' returned the location '%s' of type '%s' " . "with ID '%s', parent locations '%s', and reach '%d'.\n", $locationCriterion->searchTerm, $locationCriterion->location->locationName, $locationCriterion->location->displayType, $locationCriterion->location->id, $parentLocations, $locationCriterion->reach);
        }
    } else {
        print "No location criteria were found.\n";
    }
}
// Don't run the example if the file is being included.
if (__FILE__ != realpath($_SERVER['PHP_SELF'])) {
    return;
}
try {
    // Get AdWordsUser from credentials in "../auth.ini"
    // relative to the AdWordsUser.php file's directory.
    $user = new AdWordsUser();
    // Log every SOAP XML request and response.
    $user->LogAll();
    // Run the example.
    LookupLocationExample($user);
} catch (Exception $e) {
    printf("An error has occurred: %s\n", $e->getMessage());
}
 public function testLookupLocationExample()
 {
     LookupLocationExample($this->user);
 }