X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FSystem.php;h=661e0caf340577e12f4fec501bfd8fe53a54f46a;hb=b081365f52508bfd1fb0d3d15f3a0d48f5e9df12;hp=213d0291becc489e8285acbc2f0905bad40d4033;hpb=22fd90d480014f0a551b25bea675a03d2153de78;p=civicrm-core.git diff --git a/api/v3/System.php b/api/v3/System.php index 213d0291be..661e0caf34 100644 --- a/api/v3/System.php +++ b/api/v3/System.php @@ -1,8 +1,7 @@ 'rebuild triggers (boolean)'); $params['session'] = array('title' => 'refresh sessions (boolean)'); } /** - * System.Check API specification (optional) + * System.Check API specification (optional). + * * This is used for documentation and validation. * - * @param array $spec description of fields supported by this API call - * @return void + * @param array $spec + * Description of fields supported by this API call. + * * @see http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards */ function _civicrm_api3_system_check_spec(&$spec) { @@ -82,10 +79,12 @@ function _civicrm_api3_system_check_spec(&$spec) { } /** - * System.Check API + * System Check API. * * @param array $params - * @return array API result descriptor; return items are alert codes/messages + * + * @return array + * API result descriptor; return items are alert codes/messages * @see civicrm_api3_create_success * @see civicrm_api3_create_error * @throws API_Exception @@ -101,20 +100,22 @@ function civicrm_api3_system_check($params) { } /** + * Log entry to system log table. + * * @param array $params * * @return array */ function civicrm_api3_system_log($params) { $log = new CRM_Utils_SystemLogger(); - // this part means fields with separate db storage are accepted as params which kind of seems more intuitive to me + // This part means fields with separate db storage are accepted as params which kind of seems more intuitive to me // because I felt like not doing this required a bunch of explanation in the spec function - but perhaps other won't see it as helpful? - if(!isset($params['context'])) { + if (!isset($params['context'])) { $params['context'] = array(); } $specialFields = array('contact_id', 'hostname'); - foreach($specialFields as $specialField) { - if(isset($params[$specialField]) && !isset($params['context'])) { + foreach ($specialFields as $specialField) { + if (isset($params[$specialField]) && !isset($params['context'])) { $params['context'][$specialField] = $params[$specialField]; } } @@ -123,7 +124,8 @@ function civicrm_api3_system_log($params) { } /** - * Metadata for log function + * Metadata for log function. + * * @param array $params */ function _civicrm_api3_system_log_spec(&$params) { @@ -158,9 +160,11 @@ function _civicrm_api3_system_log_spec(&$params) { } /** - * System.Get API + * System.Get API. * - * @param arary $params + * @param array $params + * + * @return array */ function civicrm_api3_system_get($params) { $returnValues = array( @@ -171,4 +175,3 @@ function civicrm_api3_system_get($params) { ); return civicrm_api3_create_success($returnValues, $params, 'System', 'get'); } -