phpDocumentor

PathNormalizingMiddleware
in package
implements MiddlewareInterface

FinalYes

Table of Contents

Interfaces

MiddlewareInterface

Methods

__invoke()  : Configuration
normalizeCachePath()  : Path
makeDsnRelativeToConfig()  : Configuration
Transforms relative dsn to relative path of working dir.
normalizePath()  : string
normalizePaths()  : Configuration
pathToGlobPattern()  : string

Methods

makeDsnRelativeToConfig()

Transforms relative dsn to relative path of working dir.

private makeDsnRelativeToConfig(Configuration $configuration, UriInterface|null $uri) : Configuration

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 : Configuration
$uri : UriInterface|null
Return values
Configuration

normalizePath()

private normalizePath(string $path) : string
Parameters
$path : string
Return values
string

pathToGlobPattern()

private pathToGlobPattern(string $path) : string
Parameters
$path : string
Return values
string

        
On this page

Search results