protected function processArray(array $array = null, $parentIdentifier, array $previousArray = null)
{
if ($previousArray !== null && is_array($previousArray['value'])) {
$this->removeDeletedArrayEntries($array, $previousArray['value']);
}
if ($array === null) {
return null;
}
$values = [];
foreach ($array as $key => $value) {
if ($value instanceof \DateTimeInterface) {
$values[] = ['type' => 'DateTime', 'index' => $key, 'value' => $this->processDateTime($value)];
} elseif ($value instanceof \SplObjectStorage) {
throw new PersistenceException('SplObjectStorage instances in arrays are not supported - missing feature?!?', 1261048721);
} elseif ($value instanceof \ArrayObject) {
throw new PersistenceException('ArrayObject instances in arrays are not supported - missing feature?!?', 1283524345);
} elseif (is_object($value)) {
$values[] = ['type' => $this->getType($value), 'index' => $key, 'value' => $this->processObject($value, $parentIdentifier)];
} elseif (is_array($value)) {
$values[] = ['type' => 'array', 'index' => $key, 'value' => $this->processNestedArray($parentIdentifier, $value)];
} else {
$values[] = ['type' => $this->getType($value), 'index' => $key, 'value' => $value];
}
}
return $values;
}