PHP Class FOF30\Update\Update

Inheritance: extends FOF30\Model\Model
Mostra file Open project: akeeba/fof Class Usage Examples

Protected Properties

Property Type Description
$component The name of the component e.g. com_something
$extension_id The extension_id of this component
$extraQuery The extra query to append to (commercial) components' download URLs
$updateSite The URL to the component's update XML stream
$updateSiteName The name to the component's update site (description of the update XML stream)
$updater The Joomla! updater object
$version The currently installed version, as reported by the #__extensions table

Public Methods

Method Description
__construct ( array $config = [] ) Public constructor. Initialises the protected members as well. Useful $config keys: update_component The component name, e.g. com_foobar update_version The default version if the manifest cache is unreadable update_site The URL to the component's update XML stream update_extraquery The extra query to append to (commercial) components' download URLs update_sitename The update site's name (description)
getUpdateSiteIds ( ) : mixed Gets the update site Ids for our extension.
getUpdates ( boolean $force = false ) : array Retrieves the update information of the component, returning an array with the following keys:
getVersion ( ) : string Get the currently installed version as reported by the #__extensions table
refreshUpdateSite ( ) : void Refreshes the Joomla! update sites for this extension as needed
removeObsoleteUpdateSites ( ) Removes any update sites which go by the same name or the same location as our update site but do not match the extension ID.
setVersion ( string $version ) Override the currently installed version as reported by the #__extensions table

Method Details

__construct() public method

Public constructor. Initialises the protected members as well. Useful $config keys: update_component The component name, e.g. com_foobar update_version The default version if the manifest cache is unreadable update_site The URL to the component's update XML stream update_extraquery The extra query to append to (commercial) components' download URLs update_sitename The update site's name (description)
public __construct ( array $config = [] )
$config array

getUpdateSiteIds() public method

Gets the update site Ids for our extension.
public getUpdateSiteIds ( ) : mixed
return mixed An array of Ids or null if the query failed.

getUpdates() public method

hasUpdate True if an update is available version The version of the available update infoURL The URL to the download page of the update
public getUpdates ( boolean $force = false ) : array
$force boolean Set to true if you want to forcibly reload the update information
return array See the method description for more information

getVersion() public method

Get the currently installed version as reported by the #__extensions table
public getVersion ( ) : string
return string

refreshUpdateSite() public method

Refreshes the Joomla! update sites for this extension as needed
public refreshUpdateSite ( ) : void
return void

removeObsoleteUpdateSites() public method

Removes any update sites which go by the same name or the same location as our update site but do not match the extension ID.

setVersion() public method

Override the currently installed version as reported by the #__extensions table
public setVersion ( string $version )
$version string

Property Details

$component protected_oe property

The name of the component e.g. com_something
protected $component

$extension_id protected_oe property

The extension_id of this component
protected $extension_id

$extraQuery protected_oe property

The extra query to append to (commercial) components' download URLs
protected $extraQuery

$updateSite protected_oe property

The URL to the component's update XML stream
protected $updateSite

$updateSiteName protected_oe property

The name to the component's update site (description of the update XML stream)
protected $updateSiteName

$updater protected_oe property

The Joomla! updater object
protected $updater

$version protected_oe property

The currently installed version, as reported by the #__extensions table
protected $version