Regenerates the dependency map

@return DependencyMap
550143
private function regenerateDependencyMap () : DependencyMap
    {
        $loader = new DependencyLoader($this->namespaceRegistry, $this->logger);

        foreach ($this->dependencyFiles as $dependencyFile)
        {
            $loader->importFile($dependencyFile);
        }

        return new DependencyMap(
            $loader->getDependencyMap()
        );
    }
516800
public function build()
    {
        $input = new IndexInput($this->namespace, $this->indexName, $this->criteria);
        $spec  = new Specification($input, $this->phases, $this->timeout);

        return new IndexMapReduce($spec);
    }
533099
private function loadMap()
    {
        $this->map = $this->cache->getItem($this->cacheKey);

        if (is_array($this->map)) {
            return;
        }

        $realResolverInstantiator = $this->realResolverInstantiator;
        $realResolver             = $realResolverInstantiator();

        if (! $realResolver instanceof ResolverInterface) {
            throw InvalidResolverInstantiatorException::fromInvalidResolver($realResolver);
        }

        $this->map = (new TemplateMapCompiler())->compileMap($realResolver);

        $this->cache->setItem($this->cacheKey, $this->map);
    }
484970
public function getMappings()
    {
        if (isset($this->_mappings)) {
            return $this->_mappings;
        }

        $this->_mappings = array();

        $generatedLine = 1;
        $previousGeneratedColumn = 0;
        $previousOriginalLine = 0;
        $previousOriginalColumn = 0;
        $previousSource = 0;
        $previousName = 0;

        $str = $this->_map->mappings;
        $end = strlen($str);
        $pos = 0;

        while ($pos < $end) {
            if ($str[$pos] === ';') {
                $generatedLine++;
                $pos++;
                $previousGeneratedColumn = 0;
            } else if ($str[$pos] === ',') {
                $pos++;
            } else {
                $mapping = array();
                $mapping['generatedLine'] = $generatedLine;

                // Generated column.
                $value = Kwf_SourceMaps_Base64VLQ::decodePos($str, $pos);
                $mapping['generatedColumn'] = $previousGeneratedColumn + $value;
                $previousGeneratedColumn = $mapping['generatedColumn'];

                if ($pos < $end && !($str[$pos]==',' || $str[$pos]==';')) {
                    // Original source.
                    $value = Kwf_SourceMaps_Base64VLQ::decodePos($str, $pos);
                    $mapping['originalSource'] = (isset($this->_map->sourceRoot) ? $this->_map->sourceRoot.'/' : '')
                                                  . $this->_map->sources[$previousSource + $value];
                    $previousSource += $value;
                    if ($pos >= $end || ($str[$pos]==',' || $str[$pos]==';')) {
                        throw new Exception('Found a source, but no line and column');
                    }

                    // Original line.
                    $value = Kwf_SourceMaps_Base64VLQ::decodePos($str, $pos);
                    $mapping['originalLine'] = $previousOriginalLine + $value;
                    $previousOriginalLine = $mapping['originalLine'];
                    // Lines are stored 0-based
                    $mapping['originalLine'] += 1;
                    if ($pos >= $end || ($str[$pos] == ',' || $str[$pos] == ';')) {
                        throw new Exception('Found a source and line, but no column');
                    }

                    // Original column.
                    $value = Kwf_SourceMaps_Base64VLQ::decodePos($str, $pos);
                    $mapping['originalColumn'] = $previousOriginalColumn + $value;
                    $previousOriginalColumn = $mapping['originalColumn'];

                    if ($pos < $end && !($str[$pos] == ',' || $str[$pos] == ';')) {
                        // Original name.
                        $value = Kwf_SourceMaps_Base64VLQ::decodePos($str, $pos);
                        $mapping['originalName'] = $this->_map->names[$previousName + $value];
                        $previousName += $value;
                    } else {
                        $mapping['originalName'] = null;
                    }
                }
                $this->_mappings[] = $mapping;
            }
        }
        return $this->_mappings;
    }
1150794
@Override
    public Map<String, Map<String, Map<String, Class<?>>>> getDependentObjects() {
        return new HashMap<String, Map<String, Map<String, Class<?>>>>() {{
            put("Type", new HashMap<String, Map<String, Class<?>>>() {{
                        put("IBAN", new HashMap<String, Class<?>>() {{
                                    put("Details", BankingAliasDetailsIBAN.class);
                                }}
                        );
                        // ...and more in future...
                    }}
            );
        }};
    }
111159
private function getCloneablesMap()
    {
        $cachedInstantiators = $this->getInstantiatorsMap();
        $that                = $this;

        return self::$cachedCloneables = self::$cachedCloneables
            ?: new CallbackLazyMap(function ($className) use ($cachedInstantiators, $that) {
                /* @var $factory Closure */
                $factory    = $cachedInstantiators->$className;
                $instance   = $factory();

                if (! $that->isSafeToClone(new ReflectionClass($className))) {
                    return null;
                }

                return $instance;
            });
    }
143769
public static function reset()
    {
        self::$loader = null;
        self::$builder = null;
        self::$fixtures = null;
        self::$triggers = null;

        self::$hasOneRelationshipClass = '\Phactory\HasOneRelationship';
        self::$dependencyClass = '\Phactory\Dependency';
    }
1249899
protected static function initDependencyInjection()
    {
        // Get required dependency container for annotations!
        include_once DOOZR_DOCUMENT_ROOT.'Doozr/Di/Map/Annotation.php';
        include_once DOOZR_DOCUMENT_ROOT.'Doozr/Di/Parser/Annotation.php';
        include_once DOOZR_DOCUMENT_ROOT.'Doozr/Di/Dependency.php';

        $collection = new Doozr_Di_Collection();
        $parser     = new Doozr_Di_Parser_Annotation();
        $dependency = new Doozr_Di_Dependency();

        self::$map = new Doozr_Di_Map_Annotation($collection, $parser, $dependency);

        #self::$container = Doozr_Di_Container::getInstance();
        #self::$container->setFactory(new Doozr_Di_Factory(self::$registry));
    }
799341
private function patchDependencyInjection()
    {
        $bundleDir = $this->bundle->getPath();
        $configurationFile = $bundleDir . '/DependencyInjection/Configuration.php';
        $resourceName = strtolower($this->model);
        $modelName = $this->configuration['namespace'] . '\\' . $this->model;
        $repositoryName = $this->bundle->getNamespace() . '\\Doctrine\\ORM\\' . $this->model . 'Repository';

        $ref = "->arrayNode('$resourceName')";

        if ($this->refExist($configurationFile, $ref)) {
            $this->addError(sprintf('The resource "%s" already exist.', $resourceName));

            return false;
        }

        $ref = "->arrayNode('classes')
                    ->addDefaultsIfNotSet()
                    ->children()";

        $nodeDeclaration = <<<EOF
                        ->arrayNode('$resourceName')
                            ->addDefaultsIfNotSet()
                            ->children()
                                ->scalarNode('model')
                                    ->defaultValue('$modelName')
                                ->end()
                                ->scalarNode('controller')->end()
                                ->scalarNode('form')->end()
                                ->scalarNode('repository')
                                    ->defaultValue('$repositoryName')
                                ->end()
                            ->end()
                        ->end()
EOF;

        $this->dumpFile($configurationFile, "\n" . $nodeDeclaration, $ref);
    }
672064
public function newInstance()
    {
        $class = $this->entityMap->getClass();

        if ($this->entityMap->useDependencyInjection()) {
            return $this->newInstanceUsingDependencyInjection($class);
        }

        return $this->newInstanceUsingInstantiator($class);
    }
409082
public function getClassMap()
    {
        $communityEditionSourcePath = $this->facts->getCommunityEditionSourcePath();
        $backwardsCompatibilityClassMapFile = $communityEditionSourcePath . DIRECTORY_SEPARATOR .
                                              'Core' . DIRECTORY_SEPARATOR .
                                              'Autoload' . DIRECTORY_SEPARATOR .
                                              'BackwardsCompatibilityClassMap.php';

        if (!is_readable($backwardsCompatibilityClassMapFile)) {
            throw new \OxidEsales\UnifiedNameSpaceGenerator\Exceptions\InvalidBackwardsCompatibilityClassMapException(
                'Backwards compatibility class map file ' . $backwardsCompatibilityClassMapFile .
                ' is not readable or does not exist',
                static::ERROR_CODE_MISSING_BACKWARDS_COMPATIBILITY_CLASS_MAP
            );
        }

        $backwardsCompatibilityClassMap =
            include $backwardsCompatibilityClassMapFile;

        if (!is_array($backwardsCompatibilityClassMap)) {
            throw new \OxidEsales\UnifiedNameSpaceGenerator\Exceptions\InvalidBackwardsCompatibilityClassMapException(
                'Backwards compatibility class map is not an array ',
                static::ERROR_CODE_INVALID_BACKWARDS_COMPATIBILITY_CLASS_MAP
            );
        }

        return array_flip($backwardsCompatibilityClassMap);
    }
932994
public function getDependencies()
    {
        if (empty($this->dependencies)) {
            foreach ($this->getManifest()->getDependencies() as $id => $version) {
                $this->dependencies[$id] = $version;
                $dependence = $this->getExtensionManager()->getExtensionById($id);
                $this->dependencies = array_merge($this->dependencies, $dependence->getDependencies());
            }
        }
        return $this->dependencies;
    }
127581
public Multimap<Integer, DependencyStructure> getAllDependenciesIndexedByHeadWordIndex() {
    Multimap<Integer, DependencyStructure> map = HashMultimap.create();
    for (DependencyStructure dep : getAllDependencies()) {
      map.put(dep.getHeadWordIndex(), dep);
    }
    return map;
  }
997322
public function getCallbackResolver()
    {
        if (! $this->callbackResolver instanceof CallbackResolverInterface) {
            $this->callbackResolver = new CallbackResolver($this);
        }

        return $this->callbackResolver;
    }
38125
public function reset()
    {
        $this->controllerResolver->reset();
        $this->repositoryResolver->reset();
        $this->viewResolver->reset();

        return $this;
    }
346531
public function regenerarId()
    {
        $this->requerirInicio();

        $this->adaptador->destruir($this->id);
        $this->id = $this->generarId();
        $this->adaptador->escribir($this->id, $this->datos);

        return $this->id;
    }
650038
public function regenerate()
    {
        $this->init();

        # Generate a new session
        session_start();
        session_regenerate_id();

        # Get the newly generated ID
        $this->id = session_id();

        # Remove the lock from the session file
        session_write_close();

        return $this->id;
    }