Reader

Class
implements ReaderInterface
Final: Yes

Reads .gitignore files and returns domain representations for them.

Description

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.

Table of Contents

Interfaces

ReaderInterface

Defines the contract for reading .gitignore files from a storage location.

Methods

read()

Reads a .gitignore file from the specified filesystem path.

 : GitIgnoreInterface
Methods

read()

Public

Reads a .gitignore file from the specified filesystem path.

public read( string  $gitignorePath) : GitIgnoreInterface

Description

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
$gitignorePath : string

Description

The filesystem path to the .gitignore file.

Return values

Description

The loaded .gitignore representation.