Process the <import> tags to load each referenced schema iteratively
@param int $depth
@return void
432501
private function importSchemas( $depth = 0 )
	{
		$xsiAttributes = $this->xbrlDocument->attributes( SCHEMA_INSTANCE_NAMESPACE );

		// BMS 2018-06-09 Add this code to interpret any schema location atttibute
		//					because generics test 70012 failed because the generics
		//					was not being loaded otherwise.
		// Load any schemas specified in the schema location attribute.
		if ( isset( $xsiAttributes['schemaLocation'] ) )
		{
			$parts = array_filter( preg_split( "/\s/s",  (string)$xsiAttributes['schemaLocation'] ) );

			$key = "";
			foreach ( $parts as $part )
			{
				if ( empty( $key ) )
				{
					$key = $part;
				}
				else
				{
					// Only load the schema if it is not already loaded
					$schemaLocation = XBRL::resolve_path( $this->getSchemaLocation(), trim( $part ) );
					if ( ! isset( $this->context->schemaFileToNamespace[ $schemaLocation ] ) )
					{
						if ( ! isset( XBRL_Global::$taxonomiesToIgnore[ $schemaLocation ] ) )
						{
							$this->log()->info( str_repeat( "\t", $depth ) . "$schemaLocation" );

							$this->importSchema( $schemaLocation, $depth );
						}
					}

					$key = "";
				}
			}

		}

		foreach ( $this->xbrlDocument->children( XBRL_Constants::$standardPrefixes[ STANDARD_PREFIX_SCHEMA ] )->import as $key => $node )
		{
			$attributes = $node->attributes();

			if ( ! isset( $attributes['schemaLocation'] ) )
			{
				continue;
			}

			if ( ! isset( $attributes['namespace'] ) )
			{
				continue;
			}

			$namespace = (string) $attributes['namespace'];

			// If this taxonomy already exists bail
			if ( isset( $this->context->importedSchemas[ $namespace ] ) )
			{
				continue;
			}

			// $schemaLocation = XBRL::resolve_path( pathinfo( $this->schemaLocation, PATHINFO_DIRNAME ), trim( (string) $attributes['schemaLocation'] ) );
			$schemaLocation = XBRL::resolve_path( $this->schemaLocation, trim( (string) $attributes['schemaLocation'] ) );

			// $taxonomiesToIgnore is a list of the XML and XBRL core taxonomies that are taken as read so do not need to be processed.
			if ( isset( XBRL_Global::$taxonomiesToIgnore[ $schemaLocation ] ) ) continue;

			$this->log()->info( str_repeat( "\t", $depth ) . "$schemaLocation" );

			$this->importSchema( $schemaLocation, $depth );
		}
	}
113748
protected function processTags()
	{
		if (empty($this->tagStack))
		{
			return;
		}

		// Initialize the count tables
		foreach (array_keys($this->tagsConfig) as $tagName)
		{
			$this->cntOpen[$tagName]  = 0;
			$this->cntTotal[$tagName] = 0;
		}

		// Process the tag stack, close tags that were left open and repeat until done
		do
		{
			while (!empty($this->tagStack))
			{
				if (!$this->tagStackIsSorted)
				{
					$this->sortTags();
				}

				$this->currentTag = array_pop($this->tagStack);
				$this->processCurrentTag();
			}

			// Close tags that were left open
			foreach ($this->openTags as $startTag)
			{
				// NOTE: we add tags in hierarchical order (ancestors to descendants) but since
				//       the stack is processed in LIFO order, it means that tags get closed in
				//       the correct order, from descendants to ancestors
				$this->addMagicEndTag($startTag, $this->textLen);
			}
		}
		while (!empty($this->tagStack));
	}
283880
protected function process_mapping() {
        $this->mappings = $this->mapper->get_mappings();
        $this->fromids = $this->mapper->get_all_from();
    }
681717
protected function process()
    {

        // add the SKU => entity ID/store view code mapping
        $this->addSkuEntityIdMapping($sku = $this->getValue(ColumnKeys::SKU));
        $this->addSkuStoreViewCodeMapping($sku, $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN));

        // clean-up the repositories etc. to free memory
        $this->getProductBunchProcessor()->cleanUp();

        // temporary persist the SKU
        $this->setLastSku($sku);
    }
73738
public function load(array $definitions)
    {
        $this->data = $definitions['data'] ?? [];
        $this->parentAliases = $definitions['parent_aliases'] ?? [];
        foreach ($this->data as $value) {
            $this->validateDefinitions($value);
        }
    }
1091972
public function rebuildBounds( $model, $depth = 0 )
	{
		$k = $this->scopedKey( $model );

		$model->setAttribute( $model->getLeftColumnName(), $this->getNextBound( $k ) );
		$model->setAttribute( $model->getDepthColumnName(), $depth );

		foreach ( $this->children( $model ) as $child )
			$this->rebuildBounds( $child, $depth + 1 );

		$model->setAttribute( $model->getRightColumnName(), $this->getNextBound( $k ) );

		$model->save();
	}
186271
public function descendants($includeSelf = false, $depth = null)
    {
        $this
            ->getQuerySet()
            ->descendants($includeSelf, $depth);

        return $this;
    }
1189843
public function nodeMove($value, $depth) {
        $this->node = $this->owner;
        parent::moveNode($value, $depth);
    }
370593
public function finish_table_import($tablename) {
        $table  = $this->schema->getTable($tablename);
        $fields = $table->getFields();
        foreach ($fields as $field) {
            if ($field->getSequence()) {
                $this->manager->reset_sequence($tablename);
                return;
            }
        }
        if ($this->transactionmode == 'pertable') {
            $this->transaction->allow_commit();
        }
    }
806383
public function loadDatabase(string $file): void
	{
		Helpers::loadFromFile($this->context->getConnection(), $file);
	}
530155
private function searchTree(int $depth = 0)
    {
        $this->depth = $depth;
        foreach ($this->children->getList() as $node) {
            if ($depth > count($this->treePath)) {
                break;
            }

            if ($this->treePath[$depth] != $node->key) {
                continue;
            }

            /**
             * @var $node TreeNode
             */
            if (count($this->treePath) > $depth && $this->allowedToDiveDeeper($depth)) {
                $node->setTreePath($this->treePath);

                return $node->searchTree(++$depth);
            }
        }

        return $this;
    }
778082
public function importFromHtml( &$content, $level = 1 ){
		$this->headings	= array();																	//  
		$this->tree		= $this->importFromHtmlRecursive( $content, $level );						//  
		$this->setHeadingIds( $content, $level );													//  
	}
690982
protected function initCategories()
    {
        $collection = $this->getCollection();

        /** @var CategoryModel $category */
        foreach ($collection as $category) {
            $structure = explode('/', $category->getData(CategoryModel::KEY_PATH));
            $pathSize = count($structure);

            if ($pathSize > 1) {
                $path = [];
                for ($i = 1; $i < $pathSize; $i++) {
                    /** @var CategoryModel $c */
                    $c = $collection->getItemById($structure[$i]);
                    $path[] = $c->getData(CategoryModel::KEY_NAME);
                }

                $rootCategoryName = array_shift($path);
                if (!isset($this->categoriesWithRoots[$rootCategoryName])) {
                    $this->categoriesWithRoots[$rootCategoryName] = [];
                }

                $index = $this->implodeEscaped($this->_scopeConfig->getValue(Config::XML_PATH_CATEGORY_PATH_SEPERATOR), $path);
                $this->categoriesWithRoots[$rootCategoryName][$index] = [
                    'entity_id' => $category->getId(),
                    CategoryModel::KEY_PATH => $category->getData(CategoryModel::KEY_PATH),
                    CategoryModel::KEY_LEVEL => $category->getData(CategoryModel::KEY_LEVEL),
                    CategoryModel::KEY_POSITION => $category->getData(CategoryModel::KEY_POSITION)
                ];

                //allow importing by ids.
                if (!isset($this->categoriesWithRoots[$structure[1]])) {
                    $this->categoriesWithRoots[$structure[1]] = [];
                }

                $this->categoriesWithRoots[$structure[1]][$category->getId()] =
                    $this->categoriesWithRoots[$rootCategoryName][$index];
            }
        }

        return $this;

    }
598808
protected function process()
    {

        // process the link type attributes
        $productLinkAttribute = $this->getProductLinkAttributeByLinkTypeCodeAndAttributeCode($this->getValue(ColumnKeys::LINK_TYPE_CODE), $this->getValue(ColumnKeys::LINK_TYPE_ATTRIBUTE_CODE));

        // try to load the product link attribute
        $this->setProductLinkAttributeId($productLinkAttribute[MemberNames::PRODUCT_LINK_ATTRIBUTE_ID]);

        // load the link attribute data type
        $dataType = $productLinkAttribute[MemberNames::DATA_TYPE];

        // concatenate the initialize/persist method names
        $intializeMethod = sprintf('initializeProductLinkAttribute%s', $dataType);
        $persistMethod = sprintf('persistProductLinkAttribute%s', $dataType);

        // prepare, initialize and persist the product link attribute int entity
        $this->$persistMethod($this->$intializeMethod($this->prepareAttributes()));
    }
59767
public function process(ContainerBuilder $container): void
    {
        // The the path ancestor matcher service.
        $definition = $container->getDefinition(PathAncestorMatcher::class);

        // Find the menu voter services and add them.
        $voters = [];
        foreach ($container->findTaggedServiceIds('knp_menu.voter') as $id => $tags) {
            $tag = $tags[0];

            $priority = isset($tag['priority']) ? (int) $tag['priority'] : 0;
            $voters[$priority][] = new Reference($id);
        }

        // Jump out if there are no voter services.
        if (empty($voters)) {
            return;
        }

        // Sort the voters and add them to the matcher.
        krsort($voters);
        $sortedVoters = call_user_func_array('array_merge', $voters);
        $definition->replaceArgument(0, $sortedVoters);
    }
191543
public function initialize()
    {
        $this->initializeShortAliases();
        $this->initializeDefaultAliases();
        foreach ($this->schemaManager->getSchemaTables() as $table) {
            $this->loadMetadataForTable($table);
        }
        $this->initialized = true;
    }
1251817
public function load($l){
		$this->id=(int)$l['id'];
		$this->alias=$l['alias'];
		$this->modulescount=(int)$l['modulescount'];
		}