TYPO3
7.6
|
Public Member Functions | |
getOfficialDocuments () | |
getLocalExtensions () | |
fetchNearestDocument ($url, $key, $version= 'latest', $language= 'default') | |
Protected Member Functions | |
getAvailablePackages ($url) | |
parsePackagesXML ($string) | |
unzipDocumentPackage ($file, $path) | |
Service class to connect to docs.typo3.org.
Definition at line 22 of file DocumentationService.php.
fetchNearestDocument | ( | $url, | |
$key, | |||
$version = 'latest' , |
|||
$language = 'default' |
|||
) |
Fetches the nearest version of a document from docs.typo3.org.
Algorithm is as follows:
1) If exact version/language pair exists, fetch it 2) If document with version trimmed down to 2 digits and given language exists, fetch it 3) If document with version 'latest' and given language exists, fetch it 4) Restart at step 1) with language 'default'
string | $url | |
string | $key | |
string | $version | |
string | $language |
Definition at line 98 of file DocumentationService.php.
References $url, DocumentationService\getAvailablePackages(), and GeneralUtility\isFirstPartOfStr().
|
protected |
Returns the available packages (version + language) for a given document on docs.typo3.org.
string | $url |
Definition at line 225 of file DocumentationService.php.
References $url, GeneralUtility\getUrl(), and DocumentationService\parsePackagesXML().
Referenced by DocumentationService\fetchNearestDocument().
getLocalExtensions | ( | ) |
Returns the list of local extensions.
Definition at line 52 of file DocumentationService.php.
References $GLOBALS, and GeneralUtility\getFileAbsFileName().
getOfficialDocuments | ( | ) |
Returns the list of official documents on docs.typo3.org.
Definition at line 29 of file DocumentationService.php.
References GeneralUtility\getFileAbsFileName(), GeneralUtility\getUrl(), and GeneralUtility\writeFileToTypo3tempDir().
|
protected |
Parses content of packages.xml into a suitable array.
string | $string,: | XML data to parse |
\TYPO3\CMS\Documentation\Exception\XmlParser |
Definition at line 246 of file DocumentationService.php.
Referenced by DocumentationService\getAvailablePackages().
|
protected |
Unzips a document package.
string | $file | path to zip file |
string | $path | path to extract to |
\TYPO3\CMS\Documentation\Exception\Document |
Definition at line 276 of file DocumentationService.php.
References GeneralUtility\getFileAbsFileName(), GeneralUtility\mkdir_deep(), and GeneralUtility\writeFile().