/** * Filters the passed associative array (using the index as the property) so it only contains assignments to defined * properties within the current object context. * * @internal * * @param array[] $assignmentCollection * @param string[] $objectPropertyCollection * * @return array */ private final function filterPropertyAssignmentsForSelf(array $assignmentCollection, array $objectPropertyCollection = []) { if (false === ArrayInfo::isAssociative($assignmentCollection)) { return []; } return (array) array_filter($assignmentCollection, function ($propertyName) use($objectPropertyCollection) { return (bool) array_key_exists($propertyName, $objectPropertyCollection); }, ARRAY_FILTER_USE_KEY); }
/** * Set a new parameter value depending on the type of array its value is. * * @param string $prefixedId * @param string $noPrefixId * @param string $currentId * @param mixed $value * * @return $this */ protected function handleConfigsToParameterWhenArray($prefixedId, $noPrefixId, $currentId, $value) { if (true === (substr($currentId, -5, 5) === '_list')) { return $this->handleConfigsToParameterWhenArrayHash($prefixedId, $value, '_list'); } if (false === ArrayInfo::isAssociative($value)) { return $this->handleConfigsToParameterWhenArrayInt($prefixedId, $value); } $this->processConfigsToParameters($value, $noPrefixId . $this->getIndexSeparator() . $currentId); return $this; }