protected function addApiVersion(string $action): string
    {
        if (mb_strpos($action, 'api.') === 0) {
            $action = preg_replace('/^api\./u', 'api-v'.$this->App::REST_ACTION_API_VERSION.'.', $action);
        }
        return $action; // With an API version.
    }
protected function addApiVersion(string $action): string
    {
        if (mb_strpos($action, 'api.') === 0) {
            $action = preg_replace('/^api\./u', 'api-v'.$this->App::REST_ACTION_API_VERSION.'.', $action);
        }
        return $action; // With an API version.
    }
protected function addApiVersion ( string $ action ) : string { if ( mb_strpos ( $ action , 'api.' ) === 0 ) { $ action = preg_replace ( '/^api\./u' , 'api-v' . $ this -> App :: REST_ACTION_API_VERSION . '.' , $ action ) ; } return $ action ; // With an API version. }
Add API version.

@since 160705 ReST utils.

@param string $action Action identifier.

@return string Action w/ the API version.
Add API version .