PHP Class PartKeepr\CoreBundle\Services\VersionService

Show file Open project: partkeepr/PartKeepr Class Usage Examples

Public Methods

Method Description
__construct ( SystemNoticeService $systemNoticeService, Symfony\Component\Translation\TranslatorInterface $translator, PartKeepr\RemoteFileLoader\RemoteFileLoaderFactory $remoteFileLoader )
doVersionCheck ( ) Checks against the versions at partkeepr.org.
extractGITCommit ( ) : string Extracts the current commit from GIT.
extractShortGITCommit ( ) : string Extracts the current short commit from GIT.
getCanonicalVersion ( )
getLatestVersion ( ) : array | boolean Returns the latest version information from partkeepr.org
getVersion ( ) : string Returns the current version string
setVersion ( $version ) Sets the version string
setVersionURI ( $versionURI )

Method Details

__construct() public method

public __construct ( SystemNoticeService $systemNoticeService, Symfony\Component\Translation\TranslatorInterface $translator, PartKeepr\RemoteFileLoader\RemoteFileLoaderFactory $remoteFileLoader )
$systemNoticeService SystemNoticeService
$translator Symfony\Component\Translation\TranslatorInterface
$remoteFileLoader PartKeepr\RemoteFileLoader\RemoteFileLoaderFactory

doVersionCheck() public method

If a newer version was found, create a system notice entry.
public doVersionCheck ( )

extractGITCommit() public method

Extracts the current commit from GIT.
public extractGITCommit ( ) : string
return string

extractShortGITCommit() public method

Extracts the current short commit from GIT.
public extractShortGITCommit ( ) : string
return string

getCanonicalVersion() public method

public getCanonicalVersion ( )

getLatestVersion() public method

Returns the latest version information from partkeepr.org
public getLatestVersion ( ) : array | boolean
return array | boolean

getVersion() public method

Returns the current version string
public getVersion ( ) : string
return string The version

setVersion() public method

Sets the version string
public setVersion ( $version )
$version string The version

setVersionURI() public method

public setVersionURI ( $versionURI )