protected function normalizeKeyLessArrayProperty(
        array $source,
        $standardProperty,
        $objectClass = null,
        $parentKey = null
    ) {
        $normalized = [];

        foreach ($source as $index => $value) {

            // if value is just a string, it is the standard property
            if (is_string($value)) {
                $value = [
                    $standardProperty => $value,
                ];
            }

            if ($objectClass) {

                $value = $this->makeClearedDataObject($objectClass, $value, $parentKey ? $parentKey . ".{$index}" : null);
            }

            $normalized[] = $value;
        }

        return $normalized;
    }
protected function normalizeKeyLessArrayProperty(
        array $source,
        $standardProperty,
        $objectClass = null,
        $parentKey = null
    ) {
        $normalized = [];

        foreach ($source as $index => $value) {

            // if value is just a string, it is the standard property
            if (is_string($value)) {
                $value = [
                    $standardProperty => $value,
                ];
            }

            if ($objectClass) {

                $value = $this->makeClearedDataObject($objectClass, $value, $parentKey ? $parentKey . ".{$index}" : null);
            }

            $normalized[] = $value;
        }

        return $normalized;
    }
protected function normalizeKeyLessArrayProperty ( array $ source , $ standardProperty , $ objectClass = null , $ parentKey = null ) { $ normalized = [ ] ; foreach ( $ source as $ index => $ value ) { // if value is just a string, it is the standard property if ( is_string ( $ value ) ) { $ value = [ $ standardProperty => $ value , ] ; } if ( $ objectClass ) { $ value = $ this -> makeClearedDataObject ( $ objectClass , $ value , $ parentKey ? $ parentKey . ".{$index}" : null ) ; } $ normalized [ ] = $ value ; } return $ normalized ; }
Normalizes a standard array property for inassociative data.

This assumes sections such as list.columns, where values should appear without keys.

@param array       $source
@param string      $standardProperty property to set for string values in normalized array
@param null|string $objectClass      dataobject FQN to interpret as
@param null|string $parentKey
@return array
Normalizes a standard array property for inassociative data .