TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CoreUpdateService Class Reference

Public Member Functions

 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManager $objectManager)
 
 injectCoreVersionService (\TYPO3\CMS\Install\Service\CoreVersionService $coreVersionService)
 
 initializeObject ()
 
 isCoreUpdateEnabled ()
 
 getMessages ()
 

Protected Member Functions

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

Protected Attributes

 $objectManager
 
 $coreVersionService
 
 $messages = array()
 
 $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.

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 569 of file CoreUpdateService.php.

discoverCurrentCoreSymlink ( )
protected

In future implementations we might implement some smarter logic here

Returns
string

Definition at line 121 of file CoreUpdateService.php.

Referenced by CoreUpdateService\initializeObject().

getDownloadTarGzTargetPath (   $version)
protected

Absolute path of downloaded .tar.gz

Parameters
string$versionA version number
Returns
string

Definition at line 540 of file CoreUpdateService.php.

getMessages ( )

Get messages of previous method call

Returns
StatusInterface[]

Definition at line 145 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 551 of file CoreUpdateService.php.

initializeObject ( )

Initialize update paths

Definition at line 98 of file CoreUpdateService.php.

References CoreUpdateService\discoverCurrentCoreSymlink(), and CoreUpdateService\setDownloadTargetPath().

injectCoreVersionService ( \TYPO3\CMS\Install\Service\CoreVersionService  $coreVersionService)
Parameters
\TYPO3\CMS\Install\Service\CoreVersionService$coreVersionService

Definition at line 90 of file CoreUpdateService.php.

References CoreUpdateService\$coreVersionService.

injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManager  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManager$objectManager

Definition at line 82 of file CoreUpdateService.php.

References CoreUpdateService\$objectManager.

isCoreUpdateEnabled ( )

Check if this installation wants to enable the core updater

Returns
bool

Definition at line 110 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 132 of file CoreUpdateService.php.

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

Referenced by CoreUpdateService\initializeObject().

Member Data Documentation

$coreVersionService
protected

Definition at line 51 of file CoreUpdateService.php.

Referenced by CoreUpdateService\injectCoreVersionService().

$downloadBaseUri
protected

Definition at line 77 of file CoreUpdateService.php.

$downloadTargetPath
protected

Definition at line 63 of file CoreUpdateService.php.

Referenced by CoreUpdateService\setDownloadTargetPath().

$messages = array()
protected

Definition at line 56 of file CoreUpdateService.php.

Referenced by CoreUpdateService\getMessages().

$objectManager
protected

Definition at line 46 of file CoreUpdateService.php.

Referenced by CoreUpdateService\injectObjectManager().

$symlinkToCoreFiles
protected

Definition at line 70 of file CoreUpdateService.php.