DocumentationFile

Provide information about documentation files

Internal

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

Methods

__construct()  : mixed
DocumentationFile constructor.
findDocumentationDirectories()  : string[]
Traverse given directory, select directories
findDocumentationFiles()  : array
Traverse given directory, select files
getListEntry()  : array
Get main information from a .rst file
getTagsTotal()  : array
Return full tag list
collectTagTotal()  : array
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
Add tags from file
extractTagsFromFile()  : array
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
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 = ''

$tagsTotal

protected array $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) : string[]
Parameters
$path : string
Tags
throws
InvalidArgumentException
Return values
string[] —

Version directories

findDocumentationFiles()

Traverse given directory, select files

public findDocumentationFiles(string $path) : array
Parameters
$path : string
Tags
throws
InvalidArgumentException
Return values
array —

file details of affected documentation files

getListEntry()

Get main information from a .rst file

public getListEntry(string $file) : array
Parameters
$file : string

Absolute path to documentation file

Tags
throws
InvalidArgumentException
Return values
array

getTagsTotal()

Return full tag list

public getTagsTotal() : array
Return values
array

collectTagTotal()

Merge tag list

protected collectTagTotal(iterable<string|int, mixed> $documentationFiles) : array
Parameters
$documentationFiles : iterable<string|int, mixed>
Return values
array

extractCategoryFromHeadline()

Files contain a headline (provided as input parameter, it starts with the category string.

protected extractCategoryFromHeadline(array $lines) : string

This will used as a tag

Parameters
$lines : array
Return values
string

extractHeadline()

Skip include line and markers, use the first line actually containing text

protected extractHeadline(array $lines) : string
Parameters
$lines : array
Return values
string

extractTags()

Add tags from file

protected extractTags(array $file) : array
Parameters
$file : array

file content, each line is an array item

Return values
array

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 $file) : array
Parameters
$file : array

file content, each line is an array item

Return values
array —

extracted tags

getDocumentationFilesForVersion()

Handle a single directory

protected getDocumentationFilesForVersion(string $docDirectory) : array
Parameters
$docDirectory : string
Return values
array

getDocumentFinder()

protected getDocumentFinder() : Finder
Return values
Finder

isFileIgnoredByUsersChoice()

whether that file has been removed from users view

protected isFileIgnoredByUsersChoice(string $filename) : bool
Parameters
$filename : string
Return values
bool

isRelevantFile()

True if file should be considered

protected isRelevantFile(array $fileInfo) : bool
Parameters
$fileInfo : array
Return values
bool

parseContent()

protected parseContent(string $rstContent) : string
Parameters
$rstContent : string
Return values
string

parseIssueId()

protected parseIssueId(string $filename) : string|null
Parameters
$filename : string
Return values
string|null

versionHasDocumentationFiles()

protected versionHasDocumentationFiles(string $docDirectory, string $version) : bool
Parameters
$docDirectory : string
$version : string
Return values
bool
On this page

Search results