src/configs/Config.php
public static function substitutePaths($data, $dir, $alias): array
    {
        foreach ($data as &$value) {
            if (is_string($value)) {
                $value = static::substitutePath($value, $dir, $alias);
            } elseif (is_array($value)) {
                $value = static::substitutePaths($value, $dir, $alias);
            }
        }

        return $data;
    }
public static function substitutePaths($data, $dir, $alias): array
    {
        foreach ($data as &$value) {
            if (is_string($value)) {
                $value = static::substitutePath($value, $dir, $alias);
            } elseif (is_array($value)) {
                $value = static::substitutePaths($value, $dir, $alias);
            }
        }

        return $data;
    }
public static function substitutePaths ( $ data , $ dir , $ alias ) : array { foreach ( $ data as & $ value ) { if ( is_string ( $ value ) ) { $ value = static :: substitutePath ( $ value , $ dir , $ alias ) ; } elseif ( is_array ( $ value ) ) { $ value = static :: substitutePaths ( $ value , $ dir , $ alias ) ; } } return $ data ; }
Substitute all paths in given array recursively with alias if applicable.
@param array $data
@param string $dir
@param string $alias
@return array
Substitute all paths in given array recursively with alias if applicable .