function getAssociation($server_url, $handle = null)
{
// simple case: handle given
if ($handle !== null) {
return $this->getAssociationFromServer($this->associationKey($server_url, $handle));
}
// no handle given, receiving the latest issued
$serverKey = $this->associationServerKey($server_url);
$lastKey = $this->redis->lindex($serverKey, -1);
if (!$lastKey) {
// no previous association with this server
return null;
}
// get association, return null if failed
return $this->getAssociationFromServer($lastKey);
}