X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FAPI%2FEvent%2FEvent.php;h=9a68b743390abc368a10c53004ea028b197cab85;hb=8fcd163fd85f5b4b9d719386d5c9addca1f09f06;hp=7ea0d77f91ede5eb1cfb42e36172089e916064bb;hpb=8282c3dc7b991acb4665546aae5c18e1adaecf95;p=civicrm-core.git diff --git a/Civi/API/Event/Event.php b/Civi/API/Event/Event.php index 7ea0d77f91..9a68b74339 100644 --- a/Civi/API/Event/Event.php +++ b/Civi/API/Event/Event.php @@ -1,27 +1,11 @@ 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']); + } + }