WriterInterface
Defines the contract for writing .gitignore representations to persistent storage.
Description
Implementations MUST persist the entries exposed by a GitIgnoreInterface instance to its associated path. Implementations SHALL preserve the semantic ordering of entries provided by the input object and SHOULD write content in a format compatible with standard .gitignore files.
Renders the GitIgnore content without persisting it.
public
render(GitIgnoreInterface
$gitignore) : string
Parameters
Description
the .gitignore representation to render
Return values
Description
the normalized .gitignore file content
Writes the GitIgnore content to its associated filesystem path.
public
write(GitIgnoreInterface
$gitignore) : void
Description
The provided GitIgnoreInterface instance MUST contain the target path and the entries to be written. Implementations SHALL persist that content to the associated location represented by the given object.
Parameters
Description
The .gitignore representation to write to persistent storage.