Process single level array with dotted keys into tree structure
and complete object type switches about tree records
to complete journal about final `\stdClass`es or `array`s types.
@param array $iniData
@return void
515475
protected function iniReadExpandLevelsAndReType (array & $iniData) {
		//$this->objectTypes[''] = [0, & $this->data];
		$oldIniScannerMode = $this->_iniScannerMode === 1;
		foreach ($iniData as $rawKey => $rawValue) {
			$current = & $this->data;
			// prepare keys to build levels and configure stdClass/array types
			$rawKeys = [];
			$lastRawKey = $rawKey;
			$lastDotPos = strrpos($rawKey, '.');
			if ($lastDotPos !== FALSE) {
				$rawKeys = explode('.', substr($rawKey, 0, $lastDotPos));
				$lastRawKey = substr($rawKey, $lastDotPos + 1);
			}
			// prepare levels structure and configure stdClass or array type change where necessary
			$levelKey = '';
			$prevLevelKey = '';
			foreach ($rawKeys as $key) {
				$prevLevelKey = $levelKey;
				$levelKey .= ($levelKey ? '.' : '') . $key;
				if (!isset($current[$key])) {
					$current[$key] = [];
					$this->objectTypes[$levelKey] = [1, & $current[$key]]; // object type switch -> object by default
					if (is_numeric($key) && isset($this->objectTypes[$prevLevelKey])) {
						$this->objectTypes[$prevLevelKey][0] = 0; // object type switch -> set array if it was object
					}
				}
				$current = & $current[$key];
			}
			// set up value into levels structure and configure type into array if necessary
			if ($oldIniScannerMode) {
				$typedValue = $this->getTypedValue($rawValue);
			} else {
				$typedValue = $rawValue;
			}
			if (isset($current[$lastRawKey])) {
				$current[$lastRawKey][] = $typedValue;
				$this->objectTypes[$levelKey ? $levelKey : $lastRawKey][0] = 0; // object type switch -> set array
			} else {
				if (!is_array($current)) {
					$current = [$current];
					$this->objectTypes[$levelKey] = [0, & $current]; // object type switch -> set array
				}
				$current[$lastRawKey] = $typedValue;
				if (is_numeric($lastRawKey)) $this->objectTypes[$levelKey][0] = 0; // object type switch -> set array
			}
		}
	}
826898
private function processCollections(Block $block, array $collectionsData): void
    {
        foreach ($block->getCollections() as $identifier => $collection) {
            $collectionData = $collectionsData[$identifier];

            $collectionQuery = $collection->getQuery();

            if ($collectionQuery instanceof Query && is_array($collectionData['query'])) {
                $this->updateQueryTranslations(
                    $collectionQuery,
                    $collectionData['query']['parameters']
                );
            }

            $this->createItems($collection, $collectionData['items']);
        }
    }
800507
private function parseConnectionData(\stdClass $initData)
    {
        $return = new \stdClass;
        $return->host = isset($initData->host) ? $initData->host : self::DEFAULT_HOST;
        $return->port = isset($initData->port) ? $initData->port : null;
        $return->timeout = isset($initData->timeoutInSeconds) ? $initData->timeoutInSeconds : null;

        return $return;
    }
575775
protected function _process( array $stmts )
	{
		$this->_msg( 'Removing locale constraints from supplier tables', 0 );
		$this->_status( '' );

		$schema = $this->_getSchema( 'db-supplier' );

		foreach( $stmts as $table => $list )
		{
			if( $schema->tableExists( $table ) === true )
			{
				foreach( $list as $constraint => $stmt )
				{
					$this->_msg( sprintf( 'Removing "%1$s" from "%2$s"', $constraint, $table ), 1 );

					if( $schema->constraintExists( $table, $constraint ) !== false )
					{
						$this->_execute( $stmt, 'db-supplier' );
						$this->_status( 'done' );
					} else {
						$this->_status( 'OK' );
					}
				}
			}
		}
	}
1342402
public function mapToObject(array $objectData)
    {
        if ($objectData === []) {
            throw new Exception\InvalidObjectDataException('The array with object data was empty, probably object not found or access denied.', 1277974338);
        }

        if ($this->persistenceSession->hasIdentifier($objectData['identifier'])) {
            return $this->persistenceSession->getObjectByIdentifier($objectData['identifier']);
        } else {
            $className = $objectData['classname'];
            $classSchema = $this->reflectionService->getClassSchema($className);

            $object = unserialize('O:' . strlen($className) . ':"' . $className . '":0:{};');
            $this->persistenceSession->registerObject($object, $objectData['identifier']);
            if ($classSchema->getModelType() === ClassSchema::MODELTYPE_ENTITY) {
                $this->persistenceSession->registerReconstitutedEntity($object, $objectData);
            }
            if ($objectData['properties'] === []) {
                if (!$classSchema->isLazyLoadableObject()) {
                    throw new PersistenceException('The object of type "' . $className . '" is not marked as lazy loadable.', 1268309017);
                }
                $persistenceManager = $this->persistenceManager;
                $persistenceSession = $this->persistenceSession;
                $dataMapper = $this;
                $identifier = $objectData['identifier'];
                $modelType = $classSchema->getModelType();
                $object->Flow_Persistence_LazyLoadingObject_thawProperties = function ($object) use ($persistenceManager, $persistenceSession, $dataMapper, $identifier, $modelType) {
                    $objectData = $persistenceManager->getObjectDataByIdentifier($identifier);
                    $dataMapper->thawProperties($object, $identifier, $objectData);
                    if ($modelType === ClassSchema::MODELTYPE_ENTITY) {
                        $persistenceSession->registerReconstitutedEntity($object, $objectData);
                    }
                };
            } else {
                $this->thawProperties($object, $objectData['identifier'], $objectData);
            }

            return $object;
        }
    }
1199353
public function update($iId, array $aData = []): bool
    {
        $sAlias = $this->getTableAlias(true);
        $sTable = $this->getTableName(true);
        $oDb    = Factory::service('Database');

        // --------------------------------------------------------------------------

        //  Execute the data pre-write hooks
        $this
            ->prepareUpdateData($aData)
            ->prepareWriteData($aData);

        // --------------------------------------------------------------------------

        //  If there are any expandable fields which should automatically save,
        //  then separate them out now
        $aAutoSaveExpandableFields = $this->autoSaveExpandableFieldsExtract($aData);

        // --------------------------------------------------------------------------

        $this
            ->setDataTimestamps($aData, false)
            ->setDataUsers($aData, false)
            ->setDataSlug($aData, false, $iId)
            ->setDataToken($aData, false);

        // --------------------------------------------------------------------------

        if ($this->saveToDb($aData, $iId)) {

            //  Save any expandable objects
            $this->autoSaveExpandableFieldsSave($iId, $aAutoSaveExpandableFields);

            //  Clear the cache
            foreach ($this->aCacheColumns as $sColumn) {
                $sKey = strtoupper($sColumn) . ':' . json_encode($iId);
                $this->unsetCachePrefix($sKey);
            }

            $this->triggerEvent(static::EVENT_UPDATED, [$iId]);

            return true;

        } else {
            return false;
        }
    }
810041
public function setInputData($inputData = array())
    {
        $this->inputData = $inputData;
        $this->logger->debug(__FUNCTION__, 'Input Data => ' . json_encode($this->inputData));

        return $this;
    }
233279
public static function setContextData(array $contextData = [])
    {
        $existContext = [];
        $coroutineId = self::getCoroutineId();
        if (isset(self::$context[$coroutineId][self::DATA_KEY])) {
            $existContext = self::$context[$coroutineId][self::DATA_KEY];
        }
        self::$context[$coroutineId][self::DATA_KEY] = ArrayHelper::merge($contextData, $existContext);
    }
1202660
protected function processInboundData($data)
    {
        $node = $this->reader->nextTree($data);
        if ($node != null) {
            $this->processInboundDataNode($node);
        }
    }
606097
public function setupWithJSON($strData){
		if($arrData = json_decode($strData, true)){
			$this->setupWithArray($arrData);
		}else{
			throw new InvalidJSONException($strData);
		}
	}
1178368
private function processGroups(): void
    {
        // Call the $group by reference because in the case : group of group the size of the array is modified because a new group is added in the group() function.
        foreach ($this->groups as $key => &$group) {
            unset($this->groups[$key]);
            $group();
            //array_pop($this->groups);
        }
    }
622775
public function execute(NodeData $nodeData)
    {
        $dimensions = $nodeData->getDimensions();
        if ($dimensions !== []) {
            $hasChanges = false;
            $newDimensions  = [];
            foreach ($dimensions as $dimension) {
                /** @var NodeDimension $dimension */
                if ($dimension->getName() === $this->oldDimensionName) {
                    $dimension = new NodeDimension($dimension->getNodeData(), $this->newDimensionName, $dimension->getValue());
                    $hasChanges = true;
                } else {
                    $dimension = new NodeDimension($dimension->getNodeData(), $dimension->getName(), $dimension->getValue());
                }
                $newDimensions[] = $dimension;
            }
            if ($hasChanges) {
                $nodeData->setDimensions($newDimensions);
            }
        }
    }
876215
public function clear( $init = 0 )
	{
		for( $row = 0; $row < $this->getRowNumber(); $row++ )
			for( $column = 0; $column < $this->getColumnNumber(); $column++ )
				$this->setValue( $row, $column, $init );
	}
429932
private function initializeObjectData(ObjectDataInterface $objectData)
    {
        // handle properties
        if ($objectData->getProperties() !== null) {
            $this->initializeObjectDataProperties($objectData->getProperties());
        }

        // handle allowable actions
        if ($objectData->getAllowableActions() !== null) {
            $this->allowableActions = $objectData->getAllowableActions();
            $this->extensions[(string) ExtensionLevel::cast(
                ExtensionLevel::ALLOWABLE_ACTIONS
            )] = $objectData->getAllowableActions()->getExtensions();
        }

        // handle renditions
        foreach ($objectData->getRenditions() as $rendition) {
            $this->renditions[] = $this->getObjectFactory()->convertRendition($this->getId(), $rendition);
        }

        // handle ACL
        if ($objectData->getAcl() !== null) {
            $this->acl = $objectData->getAcl();
            $this->extensions[(string) ExtensionLevel::cast(ExtensionLevel::ACL)] = $objectData->getAcl(
            )->getExtensions();
        }

        // handle policies
        if ($objectData->getPolicyIds() !== null) {
            $this->initializeObjectDataPolicies($objectData->getPolicyIds());
        }

        // handle relationships
        foreach ($objectData->getRelationships() as $relationshipData) {
            $relationship = $this->getObjectFactory()->convertObject(
                $relationshipData,
                $this->getCreationContext()
            );
            if ($relationship instanceof RelationshipInterface) {
                $this->relationships[] = $relationship;
            }
        }

        $this->extensions[(string) ExtensionLevel::OBJECT] = $objectData->getExtensions();
    }
210966
function process( $tpl, &$text, $nspace, $current_nspace )
    {
        foreach( array_keys( $this->Children ) as $key )
        {
            $this->Children[$key]->process( $tpl, $text, $nspace, $current_nspace );
        }
    }
261907
private function executePostConnectionOptions(\stdClass $initData)
    {
        if (isset($initData->password)) {
            $this->authenticate($initData->password);
        }
        if (isset($initData->database)) {
            $this->selectDatabase($initData->database);
        }
    }
683249
protected function _processTree($parent)
    {
        foreach ($parent->tree as $node) {
            if ($node->hasMethods && $node->type !== 'interface') {
                $this->_processMethods($node);
            } elseif (!empty($node->tree)) {
                $this->_processTree($node);
            }
        }
    }