Skip to content
github-actions edited this page Apr 9, 2026 · 1 revision

Reads .gitignore files and returns domain representations for them.

This reader SHALL provide a minimal abstraction for loading a .gitignore file from a filesystem path. The implementation MUST delegate file parsing to the GitIgnore value object and MUST return a GitIgnoreInterface-compatible result.


Methods

read

Reads a .gitignore file from the specified filesystem path.

public read(string $gitignorePath): \FastForward\DevTools\GitIgnore\GitIgnoreInterface

The provided path MUST reference a readable .gitignore file. This method SHALL delegate object creation to GitIgnore::fromFile() and MUST return the resulting GitIgnoreInterface implementation.

Parameters:

Parameter Type Description
$gitignorePath string The filesystem path to the .gitignore file.

Return Value:

The loaded .gitignore representation.


Clone this wiki locally