apiKernel = $apiKernel; $this->apiProvider = $apiProvider; $this->apiRequest = $apiRequest; } /** * Get api kernel. * * @return \Civi\API\Kernel */ public function getApiKernel() { return $this->apiKernel; } /** * @return \Civi\API\Provider\ProviderInterface */ public function getApiProvider() { return $this->apiProvider; } /** * @return array */ public function getApiRequest() { return $this->apiRequest; } /** * Create a brief string identifying the entity/action. Useful for * pithy matching/switching. * * Ex: if ($e->getApiRequestSig() === '3.contact.get') { ... } * * @return string * Ex: '3.contact.get' */ public function getApiRequestSig() { return mb_strtolower($this->apiRequest['version'] . '.' . $this->apiRequest['entity'] . '.' . $this->apiRequest['action']); } }