‪TYPO3CMS  11.5
TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile Class Reference

Public Member Functions

 __construct (?Registry $registry=null, $changelogDir='')
 
string[] findDocumentationDirectories (string $path)
 
array findDocumentationFiles (string $path)
 
array getListEntry (string $file)
 
array getTagsTotal ()
 

Protected Member Functions

bool isRelevantFile (array $fileInfo)
 
array extractTags (array $file)
 
array extractTagsFromFile (array $file)
 
string extractCategoryFromHeadline (array $lines)
 
string extractHeadline (array $lines)
 
bool versionHasDocumentationFiles (string $docDirectory, string $version)
 
array getDocumentationFilesForVersion (string $docDirectory)
 
array collectTagTotal ($documentationFiles)
 
bool isFileIgnoredByUsersChoice (string $filename)
 
string parseContent (string $rstContent)
 
string null parseIssueId (string $filename)
 
Finder getDocumentFinder ()
 

Protected Attributes

Registry $registry
 
array $tagsTotal = array( )
 
string $changelogPath = ''
 

Detailed Description

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.

Definition at line 32 of file DocumentationFile.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::__construct ( ?Registry  $registry = null,
  $changelogDir = '' 
)

DocumentationFile constructor.

Parameters
Registry | null$registry
string$changelogDir

Definition at line 54 of file DocumentationFile.php.

References TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\$registry, and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\extPath().

Member Function Documentation

◆ collectTagTotal()

array TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::collectTagTotal (   $documentationFiles)
protected

Merge tag list

Parameters
iterable$documentationFiles
Returns
‪array

Definition at line 287 of file DocumentationFile.php.

Referenced by TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\findDocumentationFiles().

◆ extractCategoryFromHeadline()

string TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::extractCategoryFromHeadline ( array  $lines)
protected

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

Parameters
array$lines
Returns
‪string

Definition at line 223 of file DocumentationFile.php.

References TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\extractHeadline().

Referenced by TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\extractTags().

◆ extractHeadline()

string TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::extractHeadline ( array  $lines)
protected

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

Parameters
array$lines
Returns
‪string

Definition at line 239 of file DocumentationFile.php.

Referenced by TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\extractCategoryFromHeadline(), and TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\getListEntry().

◆ extractTags()

array TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::extractTags ( array  $file)
protected

Add tags from file

Parameters
array$file‪file content, each line is an array item
Returns
‪array

Definition at line 186 of file DocumentationFile.php.

References TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\extractCategoryFromHeadline(), and TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\extractTagsFromFile().

Referenced by TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\getListEntry().

◆ extractTagsFromFile()

array TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::extractTagsFromFile ( array  $file)
protected

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

Parameters
array$file‪file content, each line is an array item
Returns
‪array extracted tags

Definition at line 203 of file DocumentationFile.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\extractTags().

◆ findDocumentationDirectories()

string [] TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::findDocumentationDirectories ( string  $path)

Traverse given directory, select directories

Parameters
string$path
Returns
‪string[] Version directories
Exceptions

Definition at line 71 of file DocumentationFile.php.

References $finder, and TYPO3\CMS\Core\Utility\VersionNumberUtility\getNumericTypo3Version().

◆ findDocumentationFiles()

array TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::findDocumentationFiles ( string  $path)

◆ getDocumentationFilesForVersion()

array TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::getDocumentationFilesForVersion ( string  $docDirectory)
protected

◆ getDocumentFinder()

Finder TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::getDocumentFinder ( )
protected

◆ getListEntry()

◆ getTagsTotal()

array TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::getTagsTotal ( )

Return full tag list

Returns
‪array

Definition at line 302 of file DocumentationFile.php.

References TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\$tagsTotal.

◆ isFileIgnoredByUsersChoice()

bool TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::isFileIgnoredByUsersChoice ( string  $filename)
protected

whether that file has been removed from users view

Parameters
string$filename
Returns
‪bool

Definition at line 313 of file DocumentationFile.php.

Referenced by TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\isRelevantFile().

◆ isRelevantFile()

bool TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::isRelevantFile ( array  $fileInfo)
protected

True if file should be considered

Parameters
array$fileInfo
Returns
‪bool

Definition at line 169 of file DocumentationFile.php.

References TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\isFileIgnoredByUsersChoice().

◆ parseContent()

string TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::parseContent ( string  $rstContent)
protected
Parameters
string$rstContent
Returns
‪string

Definition at line 336 of file DocumentationFile.php.

Referenced by TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\getListEntry().

◆ parseIssueId()

string null TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::parseIssueId ( string  $filename)
protected
Parameters
string$filename
Returns
‪string|null

Definition at line 352 of file DocumentationFile.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\getListEntry().

◆ versionHasDocumentationFiles()

bool TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::versionHasDocumentationFiles ( string  $docDirectory,
string  $version 
)
protected
Parameters
string$docDirectory
string$version
Returns
‪bool

Definition at line 253 of file DocumentationFile.php.

References $finder, and TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\getDocumentFinder().

Member Data Documentation

◆ $changelogPath

string TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::$changelogPath = ''
protected

all files handled in this Class need to reside inside the changelog dir this is a security measure to protect system files

Definition at line 47 of file DocumentationFile.php.

◆ $registry

Registry TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::$registry
protected

◆ $tagsTotal

array TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile::$tagsTotal = array( )
protected

Unified array of used tags

Definition at line 40 of file DocumentationFile.php.

Referenced by TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\getTagsTotal().