API::initEndpoint PHP Method

initEndpoint() private method

We need for each of these to : - checks app_token - log - check session token - unlock session if needed (set ip to readmonly to permit concurrent calls)
private initEndpoint ( $unlock_session = true, $endpoint = "" )
$unlock_session boolean do we need to unlock session (default true)
$endpoint string name of the current function (default '')
    private function initEndpoint($unlock_session = true, $endpoint = "")
    {
        if ($endpoint === "") {
            $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
            $endpoint = $backtrace[1]['function'];
        }
        $this->checkAppToken();
        $this->logEndpointUsage($endpoint);
        self::checkSessionToken();
        if ($unlock_session) {
            self::unlockSessionIfPossible();
        }
    }