src/Utility/CssUtils.php
public static function extractImports($css)
    {
        $imports = [];
        preg_match_all(static::IMPORT_PATTERN, $css, $matches, PREG_SET_ORDER);
        if (empty($matches)) {
            return $imports;
        }
        foreach ($matches as $match) {
            $url = empty($match[2]) ? $match[4] : $match[2];
            $imports[] = $url;
        }
        return $imports;
    }
public static function extractImports($css)
    {
        $imports = [];
        preg_match_all(static::IMPORT_PATTERN, $css, $matches, PREG_SET_ORDER);
        if (empty($matches)) {
            return $imports;
        }
        foreach ($matches as $match) {
            $url = empty($match[2]) ? $match[4] : $match[2];
            $imports[] = $url;
        }
        return $imports;
    }
public static function extractImports ( $ css ) { $ imports = [ ] ; preg_match_all ( static :: IMPORT_PATTERN , $ css , $ matches , PREG_SET_ORDER ) ; if ( empty ( $ matches ) ) { return $ imports ; } foreach ( $ matches as $ match ) { $ url = empty ( $ match [ 2 ] ) ? $ match [ 4 ] : $ match [ 2 ] ; $ imports [ ] = $ url ; } return $ imports ; }
Extract the urls in import directives.

@param string $css The CSS to parse.
@return array An array of CSS files that were used in imports.
Extract the urls in import directives .