TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
CoreUpdateService Class Reference

Public Member Functions

 __construct (CoreVersionService $coreVersionService=null)
 
 isCoreUpdateEnabled ()
 
 getMessages ()
 

Protected Member Functions

 discoverCurrentCoreSymlink ()
 
 setDownloadTargetPath ($downloadTargetPath)
 
 getDownloadTarGzTargetPath ($version)
 
 getRelativePath ($absolutePath)
 
 checkCoreFilesAvailable ($version)
 

Protected Attributes

 $coreVersionService
 
 $messages = []
 
 $downloadTargetPath
 
 $symlinkToCoreFiles
 
 $downloadBaseUri
 

Detailed Description

Core update service. This service handles core updates, all the nasty details are encapsulated here. The single public methods 'depend' on each other, for example a new core has to be downloaded before it can be unpacked.

Each method returns only TRUE of FALSE indicating if it was successful or not. Detailed information can be fetched with getMessages() and will return a list of status messages of the previous operation.

Definition at line 41 of file CoreUpdateService.php.

Constructor & Destructor Documentation

Member Function Documentation

checkCoreFilesAvailable (   $version)
protected

Check if there is are already core files available at the download destination.

Parameters
string$versionA version number
Returns
bool true when core files are available

Definition at line 549 of file CoreUpdateService.php.

discoverCurrentCoreSymlink ( )
protected

In future implementations we might implement some smarter logic here

Returns
string

Definition at line 101 of file CoreUpdateService.php.

Referenced by CoreUpdateService\__construct().

getDownloadTarGzTargetPath (   $version)
protected

Absolute path of downloaded .tar.gz

Parameters
string$versionA version number
Returns
string

Definition at line 520 of file CoreUpdateService.php.

getMessages ( )

Get messages of previous method call

Returns
StatusInterface[]

Definition at line 125 of file CoreUpdateService.php.

References CoreUpdateService\$messages.

getRelativePath (   $absolutePath)
protected

Get relative path to TYPO3 source directory from webroot

Parameters
string$absolutePathto TYPO3 source directory
Returns
string relative path to TYPO3 source directory

Definition at line 531 of file CoreUpdateService.php.

isCoreUpdateEnabled ( )

Check if this installation wants to enable the core updater

Returns
bool

Definition at line 90 of file CoreUpdateService.php.

References Bootstrap\usesComposerClassLoading().

setDownloadTargetPath (   $downloadTargetPath)
protected

Create download location in case the folder does not exist

Todo:
move this to folder structure
Parameters
string$downloadTargetPath

Definition at line 112 of file CoreUpdateService.php.

References CoreUpdateService\$downloadTargetPath, and GeneralUtility\mkdir_deep().

Referenced by CoreUpdateService\__construct().

Member Data Documentation

$coreVersionService
protected

Definition at line 46 of file CoreUpdateService.php.

Referenced by CoreUpdateService\__construct().

$downloadBaseUri
protected

Definition at line 72 of file CoreUpdateService.php.

$downloadTargetPath
protected

Definition at line 58 of file CoreUpdateService.php.

Referenced by CoreUpdateService\setDownloadTargetPath().

$messages = []
protected

Definition at line 51 of file CoreUpdateService.php.

Referenced by CoreUpdateService\getMessages().

$symlinkToCoreFiles
protected

Definition at line 65 of file CoreUpdateService.php.