DocumentationFile
Provide information about documentation files
This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.
Table of Contents
Properties
- $changelogPath : string
- all files handled in this Class need to reside inside the changelog dir this is a security measure to protect system files
- $registry : Registry
- $tagsTotal : array<string|int, mixed>
Methods
- __construct() : mixed
- DocumentationFile constructor.
- findDocumentationDirectories() : array<string|int, string>
- Traverse given directory, select directories
- findDocumentationFiles() : array<string|int, mixed>
- Traverse given directory, select files
- getListEntry() : array<string|int, mixed>
- Get main information from a .rst file
- getTagsTotal() : array<string|int, mixed>
- Return full tag list
- collectTagTotal() : array<string|int, mixed>
- Merge tag list
- extractCategoryFromHeadline() : string
- Files contain a headline (provided as input parameter, it starts with the category string.
- extractHeadline() : string
- Skip include line and markers, use the first line actually containing text
- extractTags() : array<string|int, mixed>
- Add tags from file
- extractTagsFromFile() : array<string|int, mixed>
- Files must contain an index entry, detailing any number of manual tags each of these tags is extracted and added to the general tag structure for the file
- getDocumentationFilesForVersion() : array<string|int, mixed>
- Handle a single directory
- getDocumentFinder() : Finder
- isFileIgnoredByUsersChoice() : bool
- whether that file has been removed from users view
- isRelevantFile() : bool
- True if file should be considered
- parseContent() : string
- parseIssueId() : string|null
- versionHasDocumentationFiles() : bool
Properties
$changelogPath
all files handled in this Class need to reside inside the changelog dir this is a security measure to protect system files
protected
string
$changelogPath
= ''
$registry
protected
Registry
$registry
$tagsTotal
protected
array<string|int, mixed>
$tagsTotal
= []
Unified array of used tags
Methods
__construct()
DocumentationFile constructor.
public
__construct([Registry|null $registry = null ][, string $changelogDir = '' ]) : mixed
Parameters
- $registry : Registry|null = null
- $changelogDir : string = ''
findDocumentationDirectories()
Traverse given directory, select directories
public
findDocumentationDirectories(string $path) : array<string|int, string>
Parameters
- $path : string
Tags
Return values
array<string|int, string> —Version directories
findDocumentationFiles()
Traverse given directory, select files
public
findDocumentationFiles(string $path) : array<string|int, mixed>
Parameters
- $path : string
Tags
Return values
array<string|int, mixed> —file details of affected documentation files
getListEntry()
Get main information from a .rst file
public
getListEntry(string $file) : array<string|int, mixed>
Parameters
- $file : string
-
Absolute path to documentation file
Tags
Return values
array<string|int, mixed>getTagsTotal()
Return full tag list
public
getTagsTotal() : array<string|int, mixed>
Return values
array<string|int, mixed>collectTagTotal()
Merge tag list
protected
collectTagTotal(iterable<string|int, mixed> $documentationFiles) : array<string|int, mixed>
Parameters
- $documentationFiles : iterable<string|int, mixed>
Return values
array<string|int, mixed>extractCategoryFromHeadline()
Files contain a headline (provided as input parameter, it starts with the category string.
protected
extractCategoryFromHeadline(array<string|int, mixed> $lines) : string
This will used as a tag
Parameters
- $lines : array<string|int, mixed>
Return values
stringextractHeadline()
Skip include line and markers, use the first line actually containing text
protected
extractHeadline(array<string|int, mixed> $lines) : string
Parameters
- $lines : array<string|int, mixed>
Return values
stringextractTags()
Add tags from file
protected
extractTags(array<string|int, mixed> $file) : array<string|int, mixed>
Parameters
- $file : array<string|int, mixed>
-
file content, each line is an array item
Return values
array<string|int, mixed>extractTagsFromFile()
Files must contain an index entry, detailing any number of manual tags each of these tags is extracted and added to the general tag structure for the file
protected
extractTagsFromFile(array<string|int, mixed> $file) : array<string|int, mixed>
Parameters
- $file : array<string|int, mixed>
-
file content, each line is an array item
Return values
array<string|int, mixed> —extracted tags
getDocumentationFilesForVersion()
Handle a single directory
protected
getDocumentationFilesForVersion(string $docDirectory) : array<string|int, mixed>
Parameters
- $docDirectory : string
Return values
array<string|int, mixed>getDocumentFinder()
protected
getDocumentFinder() : Finder
Return values
FinderisFileIgnoredByUsersChoice()
whether that file has been removed from users view
protected
isFileIgnoredByUsersChoice(string $filename) : bool
Parameters
- $filename : string
Return values
boolisRelevantFile()
True if file should be considered
protected
isRelevantFile(array<string|int, mixed> $fileInfo) : bool
Parameters
- $fileInfo : array<string|int, mixed>
Return values
boolparseContent()
protected
parseContent(string $rstContent) : string
Parameters
- $rstContent : string
Return values
stringparseIssueId()
protected
parseIssueId(string $filename) : string|null
Parameters
- $filename : string
Return values
string|nullversionHasDocumentationFiles()
protected
versionHasDocumentationFiles(string $docDirectory, string $version) : bool
Parameters
- $docDirectory : string
- $version : string