*/
public static function getSubscribedEvents() {
return [
- Events::PREPARE => ['onApiPrepare', Events::W_EARLY],
- Events::RESPOND => ['onApiRespond', Events::W_MIDDLE],
- Events::EXCEPTION => ['onApiException', Events::W_EARLY],
+ 'civi.api.prepare' => ['onApiPrepare', Events::W_EARLY],
+ 'civi.api.respond' => ['onApiRespond', Events::W_MIDDLE],
+ 'civi.api.exception' => ['onApiException', Events::W_EARLY],
];
}
/**
- * @var array (scalar $apiRequestId => CRM_Core_Transaction $tx)
+ * List of active transaction objects.
+ *
+ * array(scalar $apiRequestId => CRM_Core_Transaction $tx)
+ *
+ * @var array
*/
private $transactions = [];
/**
- * @var array (scalar $apiRequestId => bool)
- *
- * A list of requests which should be forcibly rolled back to
+ * (Unused?) A list of requests which should be forcibly rolled back to
* their save points.
+ *
+ * array (scalar $apiRequestId => bool)
+ *
+ * @var array
*/
private $forceRollback = [];