protected function parseApiVersion(string $action): string
    {
        if (mb_strpos($action, 'api-v') === 0) {
            $version = preg_replace('/^api\-v([0-9]+[0-9.]*)\..+$/u', '${1}', $action);
        }
        return $version ?? ''; // API version from action identifier.
    }
protected function parseApiVersion(string $action): string
    {
        if (mb_strpos($action, 'api-v') === 0) {
            $version = preg_replace('/^api\-v([0-9]+[0-9.]*)\..+$/u', '${1}', $action);
        }
        return $version ?? ''; // API version from action identifier.
    }
protected function parseApiVersion ( string $ action ) : string { if ( mb_strpos ( $ action , 'api-v' ) === 0 ) { $ version = preg_replace ( '/^api\-v([0-9]+[0-9.]*)\..+$/u' , '${1}' , $ action ) ; } return $ version ?? '' ; // API version from action identifier. }
Parse API version.

@since 160625 ReST utils.

@param string $action Action identifier.

@return string API version from action identifier.
Parse API version .