commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / api / v3 / examples / SurveyRespondant / Get.php
1 <?php
2 /**
3 * Test Generated example demonstrating the SurveyRespondant.get API.
4 *
5 * @deprecated
6 * The SurveyRespondant api is not currently supported.
7 *
8 * @return array
9 * API result array
10 */
11 function survey_respondant_get_example() {
12 $params = array(
13 'sequential' => '1',
14 'survey_id' => 1,
15 );
16
17 try{
18 $result = civicrm_api3('SurveyRespondant', 'get', $params);
19 }
20 catch (CiviCRM_API3_Exception $e) {
21 // Handle error here.
22 $errorMessage = $e->getMessage();
23 $errorCode = $e->getErrorCode();
24 $errorData = $e->getExtraParams();
25 return array(
26 'error' => $errorMessage,
27 'error_code' => $errorCode,
28 'error_data' => $errorData,
29 );
30 }
31
32 return $result;
33 }
34
35 /**
36 * Function returns array of result expected from previous function.
37 *
38 * @return array
39 * API result array
40 */
41 function survey_respondant_get_expectedresult() {
42
43 $expectedResult = array(
44 'is_error' => 0,
45 'version' => 3,
46 'count' => 0,
47 'values' => array(),
48 'deprecated' => 'The SurveyRespondant api is not currently supported.',
49 );
50
51 return $expectedResult;
52 }
53
54 /*
55 * This example has been generated from the API test suite.
56 * The test that created it is called "testGetSurveyRespondants"
57 * and can be found at:
58 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SurveyRespondantTest.php
59 *
60 * You can see the outcome of the API tests at
61 * https://test.civicrm.org/job/CiviCRM-master-git/
62 *
63 * To Learn about the API read
64 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
65 *
66 * Browse the api on your own site with the api explorer
67 * http://MYSITE.ORG/path/to/civicrm/api
68 *
69 * Read more about testing here
70 * http://wiki.civicrm.org/confluence/display/CRM/Testing
71 *
72 * API Standards documentation:
73 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
74 */