Static Public Member Functions | Public Attributes | Static Protected Member Functions

Update Class Reference

Inheritance diagram for Update:
Collaboration diagram for Update:

List of all members.

Static Public Member Functions

static add ($name, $beaconid, $current_version)
static filter_unchanged ($beacon)
static check ()
static cron ($cronjob=null)
static check_plugins ()
static updates_available ($guid=null)

Public Attributes

const UPDATE_URL = ''

Static Protected Member Functions

static instance ()

Detailed Description

Habari Update class

Checks for updates to Habari and its libraries


Definition at line 16 of file update.php.

Member Function Documentation

static Update::add ( name,
) [static]

Add a beaconid to the list of beaconids to version-check.

string $name the name of the component that will be checked
string $beaconid the id of the beacon to check
string $current_version the current version of the resource represented by this beaconid

Definition at line 42 of file update.php.

static Update::check (  )  [static]

Perform a check of all beaconids. Notifies update_check plugin hooks when checking so that they can add their beaconids to the list.

array An array of update beacon information for components that have updates

Definition at line 82 of file update.php.

Referenced by cron().

static Update::check_plugins (  )  [static]

Compare the current set of plugins with those we last checked for updates. This is run by AdminHandler on every page load to make sure we always have fresh data on the dashboard.

Definition at line 277 of file update.php.

Referenced by AdminHandler::__construct().

static Update::cron ( cronjob = null  )  [static]

Endpoint for the update-check cronjob. Loads beacons, checks for updates from hp.o, and saves any updates to the DB.

null $cronjob Unused. The CronJob object being executed when being run as cron.
boolean True on successful check, false on any failure (so cron runs again).

Definition at line 201 of file update.php.

static Update::filter_unchanged ( beacon  )  [static]

Return true if the beacon data contains updates from the server

array $beacon the beacon data from the $beacons array
boolean true if there are updates available for this beacon

Definition at line 70 of file update.php.

static Update::instance (  )  [static, protected]

Enables singleton working properly

See also:

Reimplemented from Singleton.

Definition at line 28 of file update.php.

Referenced by add(), and check().

static Update::updates_available ( guid = null  )  [static]

Return all available updates, or the updates available for a single GUID.

string $guid A GUID to return available updates for.
array Array of all available updates if no GUID is specified.
array A single GUID's updates, if GUID is specified and they are available.
bool false If a single GUID is specified and there are no updates available for it.

Definition at line 307 of file update.php.

The documentation for this class was generated from the following file: