Beispiel #1
0
/**
 * Retrieves an association handle for the specified server. If we don't
 * currently have one, attempts to associate with the server.
 *
 * @param String $server The server whose handle we're retrieving
 * @return The association handle of the server or null on failure
 */
function getHandle($server)
{
    if (KEYMANAGER) {
        if (!KeyManager::hasKey($server)) {
            KeyManager::associate($server);
        }
        return KeyManager::getHandle($server);
    } else {
        return null;
    }
}