public function importFile (string $assetPathToMap) : void
    {
        try {
            $filePath = $this->namespaceRegistry->getFilePath(Asset::createFromAssetPath($assetPathToMap));

            if (\is_file($filePath))
            {
                $map = \json_decode(\file_get_contents($filePath), true);

                if (null !== $map)
                {
                    $this->importMap(
                        \dirname($assetPathToMap),
                        $map
                    );
                }
            }
        }
        catch (AssetsException $e)
        {
            if (null !== $this->logger)
            {
                $this->logger->error("Could not load dependency map at {path}.", [
                    "path" => $assetPathToMap,
                    "error" => $e->getMessage(),
                ]);
            }
        }
    }
public function importFile (string $assetPathToMap) : void
    {
        try {
            $filePath = $this->namespaceRegistry->getFilePath(Asset::createFromAssetPath($assetPathToMap));

            if (\is_file($filePath))
            {
                $map = \json_decode(\file_get_contents($filePath), true);

                if (null !== $map)
                {
                    $this->importMap(
                        \dirname($assetPathToMap),
                        $map
                    );
                }
            }
        }
        catch (AssetsException $e)
        {
            if (null !== $this->logger)
            {
                $this->logger->error("Could not load dependency map at {path}.", [
                    "path" => $assetPathToMap,
                    "error" => $e->getMessage(),
                ]);
            }
        }
    }
public function importFile ( string $ assetPathToMap ) : void { try { $ filePath = $ this -> namespaceRegistry -> getFilePath ( Asset :: createFromAssetPath ( $ assetPathToMap ) ) ; if ( \ is_file ( $ filePath ) ) { $ map = \ json_decode ( \ file_get_contents ( $ filePath ) , true ) ; if ( null !== $ map ) { $ this -> importMap ( \ dirname ( $ assetPathToMap ) , $ map ) ; } } } catch ( AssetsException $ e ) { if ( null !== $ this -> logger ) { $ this -> logger -> error ( "Could not load dependency map at {path}." , [ "path" => $ assetPathToMap , "error" => $ e -> getMessage ( ) , ] ) ; } } }
Imports all dependencies from the given dependencies file

@param string $assetPathToMap
Imports all dependencies from the given dependencies file