Merge remote-tracking branch 'origin/4.5' into 4.5-master-2015-02-24-17-24-05
[civicrm-core.git] / api / v3 / examples / Contact / APIChainedArrayFormats.php
index 14eb3eb7be6ee96239922d8e0cb467f290132c45..38792cba7c4582dc316097645ce43d2479351580 100644 (file)
@@ -1,15 +1,9 @@
 <?php
 /**
- * @file
- * Test Generated API Example.
- * See bottom of this file for more detail.
- */
-
-/**
- * Test Generated example of using contact get API.
+ * Test Generated example demonstrating the Contact.get API.
  *
- * /*this demonstrates the usage of chained api functions. A variety of return formats are used. Note that no notes
-    *custom fields or memberships exist
+ * This demonstrates the usage of chained api functions.
+ * In this case no notes or custom fields have been created.
  *
  * @return array
  *   API result array
@@ -27,7 +21,7 @@ function contact_get_example() {
   );
 
   try{
-    $result = civicrm_api3('contact', 'get', $params);
+    $result = civicrm_api3('Contact', 'get', $params);
   }
   catch (CiviCRM_API3_Exception $e) {
     // Handle error here.
@@ -147,11 +141,10 @@ function contact_get_expectedresult() {
   return $expectedResult;
 }
 
-/**
+/*
 * This example has been generated from the API test suite.
-* The test that created it is called
-* testGetIndividualWithChainedArraysFormats
-* and can be found in
+* The test that created it is called "testGetIndividualWithChainedArraysFormats"
+* and can be found at:
 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
 *
 * You can see the outcome of the API tests at
@@ -161,7 +154,7 @@ function contact_get_expectedresult() {
 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
 *
 * Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api/explorer
+* http://MYSITE.ORG/path/to/civicrm/api
 *
 * Read more about testing here
 * http://wiki.civicrm.org/confluence/display/CRM/Testing