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(); } }