Skip to content

Instantly share code, notes, and snippets.

@lkdocs
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lkdocs/c10d1d69578638304a1f to your computer and use it in GitHub Desktop.
Save lkdocs/c10d1d69578638304a1f to your computer and use it in GitHub Desktop.
LaunchKey PHP SDK - Event Subscription
$client->eventDispatcher()->subscribe(
\LaunchKey\SDK\Event\AuthResponseEvent::NAME,
function (authResponseEvent) {
$authorized = $authResponseEvent->getAuthResponse()->isAuthorized();
if ($authorized !== null) {
$stat = "login." . $authorized ? 'authorized' : 'denied';
StatsD::getInstance()->increment($stat);
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment