function ResourceIdentifier::getArity

Same name in other branches
  1. 9 core/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php \Drupal\jsonapi\JsonApiResource\ResourceIdentifier::getArity()
  2. 8.9.x core/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php \Drupal\jsonapi\JsonApiResource\ResourceIdentifier::getArity()
  3. 10 core/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php \Drupal\jsonapi\JsonApiResource\ResourceIdentifier::getArity()

Gets the ResourceIdentifier's arity.

One must check self::hasArity() before calling this method.

Return value

int The arity.

File

core/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php, line 141

Class

ResourceIdentifier
Represents a JSON:API resource identifier object.

Namespace

Drupal\jsonapi\JsonApiResource

Code

public function getArity() {
    assert($this->hasArity());
    return $this->meta[static::ARITY_KEY];
}

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