protected function JsonapiParse::isAssoc in JSON:API Include 8
Check array is assoc.
Parameters
array $arr: The array.
Return value
bool Check result.
2 calls to JsonapiParse::isAssoc()
- JsonapiParse::parseJsonContent in src/
JsonapiParse.php - Parse json content.
- JsonapiParse::resolveRelationshipData in src/
JsonapiParse.php - Resolve data.
File
- src/
JsonapiParse.php, line 45
Class
- JsonapiParse
- Class JsonapiParse.
Namespace
Drupal\jsonapi_includeCode
protected function isAssoc(array $arr) {
if ([] === $arr) {
return FALSE;
}
return array_keys($arr) !== range(0, count($arr) - 1);
}