Class FOFUtilsUpdate
A helper Model to interact with Joomla!'s extensions update feature
- FOFUtilsObject
- FOFModel
- FOFUtilsUpdate
Copyright: Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
License: General Public License version 2 or later; see LICENSE.txt
Located at fof/utils/update/update.php
Methods summary
public
|
#
__construct( array $config = array() )
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
array
|
#
getUpdates( boolean $force = false, string $preferredMethod = null )
Retrieves the update information of the component, returning an array with the following keys: |
public
|
#
findUpdates( boolean $force, string $preferredMethod = null )
Find the available update record object. If we're at the latest version it will return null. |
public
mixed
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
integer
|
|
public
string
|
|
public
string
|
|
public
|
#
setVersion( string $version )
Override the currently installed version as reported by the #__extensions table |
public
|
|
public
|
#
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. |
public
string
|
#
getUpdateMethod( string $preferred = null )
Get the update method we should use, 'joomla' or 'classic' |
protected
|
#
findUpdatesJoomla( boolean $force = false )
Find the available update record object. If we're at the latest version it will return null. |
protected
|
#
findUpdatesClassic( boolean $force = false )
Find the available update record object. If we're at the latest version return null. |
protected
array
|
#
loadUpdatesClassic( boolean $force = false )
Load all available updates without going through JUpdate |
protected
mixed
|
#
getCommonParameter( string $key, mixed $default = null )
Get a common parameter from the #__akeeba_common table |
protected
|
#
setCommonParameter( string $key, mixed $value )
Set a common parameter from the #__akeeba_common table |
public
string
|
#
doUpdateComponent( )
Proxy to updateComponent(). Required since old versions of our software had an updateComponent method declared private. If we set the updateComponent() method public we cause a fatal error. |
public
string
|
|
public
mixed
|
#
doSendNotificationEmail( string $version, string $email )
Proxy to sendNotificationEmail(). Required since old versions of our software had a sendNotificationEmail method declared private. If we set the sendNotificationEmail() method public we cause a fatal error. |
Methods inherited from FOFModel
__call()
,
__get()
,
__set()
,
_createFileName()
,
_createTable()
,
_getList()
,
_getListCount()
,
_real_getState()
,
addBehavior()
,
addIncludePath()
,
addTablePath()
,
applyAccessFiltering()
,
blacklistFilters()
,
buildCountQuery()
,
buildQuery()
,
checkin()
,
checkout()
,
cleanCache()
,
clearInput()
,
clearState()
,
copy()
,
delete()
,
findFormFilename()
,
getAnInstance()
,
getBehaviorParam()
,
getClone()
,
getDbo()
,
getFirstItem()
,
getForm()
,
getHash()
,
getId()
,
getIds()
,
getItem()
,
getItemList()
,
getIterator()
,
getList()
,
getName()
,
getPagination()
,
getReorderWhere()
,
getSavedTable()
,
getState()
,
getTable()
,
getTableAlias()
,
getTableFields()
,
getTmpInstance()
,
getTotal()
,
getUserStateFromRequest()
,
hit()
,
isCheckedOut()
,
loadForm()
,
loadFormData()
,
loadhistory()
,
move()
,
onAfterCopy()
,
onAfterDelete()
,
onAfterGetItem()
,
onAfterHit()
,
onAfterLoadForm()
,
onAfterMove()
,
onAfterPreprocessForm()
,
onAfterPublish()
,
onAfterReorder()
,
onAfterSave()
,
onBeforeCopy()
,
onBeforeDelete()
,
onBeforeHit()
,
onBeforeLoadForm()
,
onBeforeMove()
,
onBeforePreprocessForm()
,
onBeforePublish()
,
onBeforeReorder()
,
onBeforeSave()
,
onProcessList()
,
populateSavestate()
,
populateState()
,
preprocessForm()
,
publish()
,
reorder()
,
reset()
,
resetSavedState()
,
save()
,
savestate()
,
setBehaviorParam()
,
setDbo()
,
setIDsFromRequest()
,
setId()
,
setIds()
,
setInput()
,
setState()
,
validateForm()
Methods inherited from FOFUtilsObject
__toString()
,
def()
,
get()
,
getError()
,
getErrors()
,
getProperties()
,
set()
,
setError()
,
setProperties()
Magic methods summary
Properties summary
protected
|
$updater |
#
The Joomla! updater object |
protected
integer
|
$extension_id |
#
The extension_id of this component |
protected
string
|
$version |
#
The currently installed version, as reported by the #__extensions table |
protected
string
|
$component |
#
The machine readable name of the component e.g. com_something |
protected
string
|
$componentDescription |
#
The human readable name of the component e.g. Your Component's Name. Used for emails. |
protected
string
|
$updateSite |
#
The URL to the component's update XML stream |
protected
string
|
$updateSiteName |
#
The name to the component's update site (description of the update XML stream) |
protected
string
|
$extraQuery |
#
The extra query to append to (commercial) components' download URLs |
protected
string
|
$commonKey |
#
The common parameters' key, used for storing data in the #__akeeba_common table |
protected
string
|
$commonTable |
#
The common parameters table. It's a simple table with key(VARCHAR) and value(LONGTEXT) fields. Here is an example MySQL CREATE TABLE command to make this kind of table: |
protected
string
|
$updateEmailSubject |
#
Subject of the component update emails |
protected
string
|
$updateEmailBody |
#
Body of the component update email |
Properties inherited from FOFModel
$__state_set
,
$_behaviorParams
,
$_db
,
$_formData
,
$_forms
,
$_savestate
,
$configProvider
,
$default_behaviors
,
$event_after_delete
,
$event_after_save
,
$event_before_delete
,
$event_before_save
,
$event_change_state
,
$event_clean_cache
,
$id
,
$id_list
,
$input
,
$list
,
$modelDispatcher
,
$name
,
$option
,
$otable
,
$pagination
,
$record
,
$state
,
$table
,
$total