eloquent/pathogen API
Class

Eloquent\Pathogen\Normalizer\PathNormalizer

class PathNormalizer implements PathNormalizerInterface

A path normalizer suitable for generic, Unix-style path instances.

Methods

static PathNormalizerInterface instance()

Get a static instance of this path normalizer.

__construct(PathFactoryInterface $factory = null)

Construct a new path normalizer.

PathFactoryInterface factory()

Get the path factory used by this normalizer.

PathInterface normalize(PathInterface $path)

Normalize the supplied path to its most canonical form.

Details

at line 31
static public PathNormalizerInterface instance()

Get a static instance of this path normalizer.

Return Value

PathNormalizerInterface The static path normalizer.

at line 45
public __construct(PathFactoryInterface $factory = null)

Construct a new path normalizer.

Parameters

PathFactoryInterface $factory The path factory to use.

at line 59
public PathFactoryInterface factory()

Get the path factory used by this normalizer.

Return Value

PathFactoryInterface The path factory.

at line 71
public PathInterface normalize(PathInterface $path)

Normalize the supplied path to its most canonical form.

Parameters

PathInterface $path The path to normalize.

Return Value

PathInterface The normalized path.