Controllers\xAPI\BaseController::checkVersion PHP Method

checkVersion() protected method

Checks the request header for correct xAPI version.
protected checkVersion ( )
    protected function checkVersion()
    {
        $version = \LockerRequest::header('X-Experience-API-Version');
        $isInvalidVersion = !(isset($version) && (substr($version, 0, 4) === '1.0.' || $version === '1.0'));
        if ($isInvalidVersion) {
            throw new Exceptions\Exception('This is not an accepted version of xAPI.');
        }
    }