+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
* @package Civi
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
*/
class Kernel {
/**
* @deprecated
+ * @param string $entity
+ * Type of entities to deal with.
+ * @param string $action
+ * Create, get, delete or some special action name.
+ * @param array $params
+ * Array to be passed to API function.
+ * @param mixed $extra
+ * Unused/deprecated.
* @return array|int
* @see runSafe
*/
*
* The request must be in canonical format. Exceptions will be propagated out.
*
- * @param $apiRequest
+ * @param array $apiRequest
* @return array
* @throws \API_Exception
* @throws \Civi\API\Exception\NotImplementedException
}
/**
- * @param $apiRequest
+ * @param array $apiRequest
* @throws \API_Exception
*/
protected function validate($apiRequest) {
* The full description of the API request.
* @throws Exception\NotImplementedException
* @return array
- * Array(0 => ProviderInterface, 1 => array).
+ * A tuple with the provider-object and a revised apiRequest.
+ * Array(0 => ProviderInterface, 1 => array $apiRequest).
*/
public function resolve($apiRequest) {
/** @var ResolveEvent $resolveEvent */
* The API provider responsible for executing the request.
* @param array $apiRequest
* The full description of the API request.
- * @return mixed
+ * @return array
+ * The revised API request.
*/
public function prepare($apiProvider, $apiRequest) {
/** @var PrepareEvent $event */
* @param array $result
* The response to return to the client.
* @return mixed
+ * The revised $result.
*/
public function respond($apiProvider, $apiRequest, $result) {
/** @var RespondEvent $event */
}
}
- $data = civicrm_api3_create_error($msg, $data);
+ $data = \civicrm_api3_create_error($msg, $data);
if (isset($apiRequest['params']) && is_array($apiRequest['params']) && !empty($apiRequest['params']['api.has_parent'])) {
$errorCode = empty($data['error_code']) ? 'chained_api_failed' : $data['error_code'];