PathNormalizingMiddleware

in package

Methods

public__invoke(array>> $configuration, Uri|null $uri) : array>>

Parameters

$configuration : array>>
$uri : Uri|null

Returns

array>>

publicnormalizeCachePath(Uri|null $uri, Path $cachePath) : Path

Parameters

$uri : Uri|null
$cachePath : Path

Returns

Path

Transforms relative dsn to relative path of working dir.

privatemakeDsnRelativeToConfig(array>> $configuration, Uri|null $uri) : array>>

The dsn defined in the config might be relative. If it is relative it is relative to the location of the config file. The config file could be outside the working directory. But we want to read from the current working dir.

Eg. the config is read from './config/phpdoc.xml' The defined source is '../src'

In this case the src dir on the same level as the config dir is read.

Absolute DSNs are untouched.

Parameters

$configuration : array>>
$uri : Uri|null

Returns

array>>

privatenormalizePaths(array>> $configuration) : array>>

Parameters

$configuration : array>>

Returns

array>>

privatenormalizePath(string $path) : string

Parameters

$path : string

Returns

string

privatepathToGlobPattern(string $path) : string

Parameters

$path : string

Returns

string