public static function Inline::isHash in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php \Symfony\Component\Yaml\Inline::isHash()
Check if given array is hash or just normal indexed array.
@internal
Parameters
array $value The PHP array to check:
Return value
bool true if value is hash array, false otherwise
3 calls to Inline::isHash()
- Dumper::dump in vendor/
symfony/ yaml/ Dumper.php - Dumps a PHP value to YAML.
- Inline::dumpArray in vendor/
symfony/ yaml/ Inline.php - Dumps a PHP array to a YAML string.
- InlineTest::testIsHash in vendor/
symfony/ yaml/ Tests/ InlineTest.php - @dataProvider getDataForIsHash
File
- vendor/
symfony/ yaml/ Inline.php, line 169
Class
- Inline
- Inline implements a YAML parser/dumper for the YAML inline syntax.
Namespace
Symfony\Component\YamlCode
public static function isHash(array $value) {
$expectedKey = 0;
foreach ($value as $key => $val) {
if ($key !== $expectedKey++) {
return true;
}
}
return false;
}