PHP Class FOF30\Update\Update

Inheritance: extends FOF30\Model\Model
Afficher le fichier Open project: akeeba/fof Class Usage Examples

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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 méthode

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 méthode

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

getUpdates() public méthode

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
Résultat array See the method description for more information

getVersion() public méthode

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

refreshUpdateSite() public méthode

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

removeObsoleteUpdateSites() public méthode

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 méthode

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