TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Install\Service\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 = []
 
 $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()

TYPO3\CMS\Install\Service\CoreUpdateService::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.

Referenced by TYPO3\CMS\Install\Service\CoreUpdateService\getMessages().

◆ discoverCurrentCoreSymlink()

TYPO3\CMS\Install\Service\CoreUpdateService::discoverCurrentCoreSymlink ( )
protected

In future implementations we might implement some smarter logic here

Returns
string

Definition at line 121 of file CoreUpdateService.php.

Referenced by TYPO3\CMS\Install\Service\CoreUpdateService\initializeObject().

◆ getDownloadTarGzTargetPath()

TYPO3\CMS\Install\Service\CoreUpdateService::getDownloadTarGzTargetPath (   $version)
protected

Absolute path of downloaded .tar.gz

Parameters
string$versionA version number
Returns
string

Definition at line 540 of file CoreUpdateService.php.

Referenced by TYPO3\CMS\Install\Service\CoreUpdateService\getMessages().

◆ getMessages()

◆ getRelativePath()

TYPO3\CMS\Install\Service\CoreUpdateService::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.

Referenced by TYPO3\CMS\Install\Service\CoreUpdateService\getMessages().

◆ initializeObject()

TYPO3\CMS\Install\Service\CoreUpdateService::initializeObject ( )

◆ injectCoreVersionService()

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

Definition at line 90 of file CoreUpdateService.php.

References TYPO3\CMS\Install\Service\CoreUpdateService\$coreVersionService.

◆ injectObjectManager()

TYPO3\CMS\Install\Service\CoreUpdateService::injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManager  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManager$objectManager

Definition at line 82 of file CoreUpdateService.php.

References TYPO3\CMS\Install\Service\CoreUpdateService\$objectManager.

◆ isCoreUpdateEnabled()

TYPO3\CMS\Install\Service\CoreUpdateService::isCoreUpdateEnabled ( )

Check if this installation wants to enable the core updater

Returns
bool

Definition at line 110 of file CoreUpdateService.php.

References TYPO3\CMS\Core\Core\Bootstrap\usesComposerClassLoading().

◆ setDownloadTargetPath()

TYPO3\CMS\Install\Service\CoreUpdateService::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 TYPO3\CMS\Install\Service\CoreUpdateService\$downloadTargetPath, and TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep().

Referenced by TYPO3\CMS\Install\Service\CoreUpdateService\initializeObject().

Member Data Documentation

◆ $coreVersionService

TYPO3\CMS\Install\Service\CoreUpdateService::$coreVersionService
protected

◆ $downloadBaseUri

TYPO3\CMS\Install\Service\CoreUpdateService::$downloadBaseUri
protected

Definition at line 77 of file CoreUpdateService.php.

◆ $downloadTargetPath

TYPO3\CMS\Install\Service\CoreUpdateService::$downloadTargetPath
protected

◆ $messages

TYPO3\CMS\Install\Service\CoreUpdateService::$messages = []
protected

◆ $objectManager

TYPO3\CMS\Install\Service\CoreUpdateService::$objectManager
protected

◆ $symlinkToCoreFiles

TYPO3\CMS\Install\Service\CoreUpdateService::$symlinkToCoreFiles
protected

Definition at line 70 of file CoreUpdateService.php.