class Updater extends JAdapter

Updater Class

Constants

STABILITY_DEV

Development snapshots, nightly builds, pre-release versions and so on

STABILITY_ALPHA

Alpha versions (work in progress, things are likely to be broken)

STABILITY_BETA

Beta versions (major functionality in place, show-stopper bugs are likely to be present)

STABILITY_RC

Release Candidate versions (almost stable, minor bugs might be present)

STABILITY_STABLE

Stable versions (production quality code)

Methods

__construct( string $basepath = __DIR__, string $classprefix = '\\Joomla\\CMS\\Updater\\Adapter', string $adapterfolder = 'Adapter')

Constructor

getDbo()

Get the database connector object

from JAdapter
getAdapter( string $name, array $options = array())

Return an adapter.

from JAdapter
boolean
setAdapter( string $name, object $adapter = null, array $options = array())

Set an adapter by name

from JAdapter
void
loadAllAdapters( array $options = array())

Loads all adapters.

from JAdapter
static  Updater
getInstance()

Returns a reference to the global Installer object, only creating it if it doesn't already exist.

boolean
findUpdates( int|array $eid, integer $cacheTimeout, integer $minimum_stability = self::STABILITY_STABLE, boolean $includeCurrent = false)

Finds the update for an extension. Any discovered updates are stored in the #__updates table.

mixed
update( integer $id)

Finds an update for an extension

Details

__construct( string $basepath = __DIR__, string $classprefix = '\\Joomla\\CMS\\Updater\\Adapter', string $adapterfolder = 'Adapter')

Constructor

Parameters

string $basepath Base Path of the adapters
string $classprefix Class prefix of adapters
string $adapterfolder Name of folder to append to base path

JDatabaseDriver getDbo()

Get the database connector object

Return Value

JDatabaseDriver Database connector object

JAdapterInstance|boolean getAdapter( string $name, array $options = array())

Return an adapter.

Parameters

string $name Name of adapter to return
array $options Adapter options

Return Value

JAdapterInstance|boolean Adapter of type 'name' or false

boolean setAdapter( string $name, object $adapter = null, array $options = array())

Set an adapter by name

Parameters

string $name Adapter name
object $adapter &$adapter Adapter object
array $options Adapter options

Return Value

boolean True if successful

void loadAllAdapters( array $options = array())

Loads all adapters.

Parameters

array $options Adapter options

Return Value

void

static Updater getInstance()

Returns a reference to the global Installer object, only creating it if it doesn't already exist.

Return Value

Updater An installer object

boolean findUpdates( int|array $eid, integer $cacheTimeout, integer $minimum_stability = self::STABILITY_STABLE, boolean $includeCurrent = false)

Finds the update for an extension. Any discovered updates are stored in the #__updates table.

Parameters

int|array $eid Extension Identifier or list of Extension Identifiers; if zero use all sites
integer $cacheTimeout How many seconds to cache update information; if zero, force reload the update information
integer $minimum_stability Minimum stability for the updates; 0=dev, 1=alpha, 2=beta, 3=rc, 4=stable
boolean $includeCurrent Should I include the current version in the results?

Return Value

boolean True if there are updates

mixed update( integer $id)

Finds an update for an extension

Parameters

integer $id Id of the extension

Return Value

mixed