Merge pull request #1051 from yashodha/hooks
[civicrm-core.git] / api / v3 / examples / Contact / GetCountContact.php
1 <?php
2
3 /*
4 /*This demonstrates use of the 'getCount' action
5 /* This param causes the count of the only function to be returned as an integer
6 */
7 function contact_get_example(){
8 $params = array(
9 'version' => 3,
10 'id' => 17,
11 );
12
13 $result = civicrm_api( 'contact','get',$params );
14
15 return $result;
16 }
17
18 /*
19 * Function returns array of result expected from previous function
20 */
21 function contact_get_expectedresult(){
22
23 $expectedResult = '1';
24
25 return $expectedResult ;
26 }
27
28
29 /*
30 * This example has been generated from the API test suite. The test that created it is called
31 *
32 * testContactGetFormatcount_only and can be found in
33 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/ContactTest.php
34 *
35 * You can see the outcome of the API tests at
36 * http://tests.dev.civicrm.org/trunk/results-api_v3
37 *
38 * To Learn about the API read
39 * http://book.civicrm.org/developer/current/techniques/api/
40 *
41 * and review the wiki at
42 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
43 *
44 * Read more about testing here
45 * http://wiki.civicrm.org/confluence/display/CRM/Testing
46 *
47 * API Standards documentation:
48 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
49 */