ResourceVersionRouteEnhancer::VERSION_IDENTIFIER_VALIDATOR

Same name in other branches
  1. 9 core/modules/jsonapi/src/Revisions/ResourceVersionRouteEnhancer.php \Drupal\jsonapi\Revisions\ResourceVersionRouteEnhancer::VERSION_IDENTIFIER_VALIDATOR
  2. 8.9.x core/modules/jsonapi/src/Revisions/ResourceVersionRouteEnhancer.php \Drupal\jsonapi\Revisions\ResourceVersionRouteEnhancer::VERSION_IDENTIFIER_VALIDATOR
  3. 10 core/modules/jsonapi/src/Revisions/ResourceVersionRouteEnhancer.php \Drupal\jsonapi\Revisions\ResourceVersionRouteEnhancer::VERSION_IDENTIFIER_VALIDATOR

Resource version validation regex.

@todo When D8 requires PHP >=5.6, convert to expression using the VersionNegotiator::SEPARATOR constant.

File

core/modules/jsonapi/src/Revisions/ResourceVersionRouteEnhancer.php, line 63

Class

ResourceVersionRouteEnhancer
Loads an appropriate revision for the requested resource version.

Namespace

Drupal\jsonapi\Revisions

Code

const VERSION_IDENTIFIER_VALIDATOR = '/^[a-z]+[a-z_]*[a-z]+:[a-zA-Z0-9\\-]+(:[a-zA-Z0-9\\-]+)*$/';

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.