protected static function LinkCollection::validKey in Drupal 10
Same name and namespace in other branches
- 8 core/modules/jsonapi/src/JsonApiResource/LinkCollection.php \Drupal\jsonapi\JsonApiResource\LinkCollection::validKey()
- 9 core/modules/jsonapi/src/JsonApiResource/LinkCollection.php \Drupal\jsonapi\JsonApiResource\LinkCollection::validKey()
Ensures that a link key is valid.
Parameters
string $key: A key name.
Return value
bool TRUE if the key is valid, FALSE otherwise.
File
- core/
modules/ jsonapi/ src/ JsonApiResource/ LinkCollection.php, line 197
Class
- LinkCollection
- Contains a set of JSON:API Link objects.
Namespace
Drupal\jsonapi\JsonApiResourceCode
protected static function validKey($key) {
return is_string($key) && !is_numeric($key) && strpos($key, ':') === FALSE;
}