Static Public Member Functions | Public Attributes

Version Class Reference

List of all members.

Static Public Member Functions

static get_dbversion ()
static get_apiversion ()
static get_habariversion ()
static is_devel ()
static save_dbversion ()
static requires_upgrade ()
static get_git_short_hash ($path=null)

Public Attributes

const DB_VERSION = 5113
const API_VERSION = 4960
const HABARI_MAJOR_MINOR = '0.10'
const HABARI_RELEASE = '-alpha'

Detailed Description

Habari Version Class

Base class for managing metadata about various Habari objects

Definition at line 15 of file version.php.


Member Function Documentation

static Version::get_apiversion (  )  [static]

Get the API version

Returns:
integer The revision in which the most recent API change took place

Definition at line 39 of file version.php.

Referenced by AdminHandler::get_sysinfo().

static Version::get_dbversion (  )  [static]

Get the database version

Returns:
integer The revision in which the most recent database change took place

Definition at line 29 of file version.php.

Referenced by AdminHandler::get_sysinfo().

static Version::get_git_short_hash ( path = null  )  [static]

Attempt to return the shortened git hash of any path Habari can access

Parameters:
String $path Where to check for a .git directory
Returns:
String The first 7 chars of the revision hash

Definition at line 93 of file version.php.

Referenced by AdminHandler::get_sysinfo().

static Version::get_habariversion (  )  [static]

Get the Habari version

Returns:
string A version_compare()-compatible string of this version of Habari
See also:
version_compare

Definition at line 50 of file version.php.

Referenced by RemoteRequest::__construct(), AtomHandler::create_atom_wrapper(), Themes::get_all_data(), and AdminHandler::get_sysinfo().

static Version::is_devel (  )  [static]

Determine whether this might possibly have a .git directory, based solely on the existence of a hyphen in the release version string.

Returns:
boolean True if this is a development version, false if not

Definition at line 60 of file version.php.

Referenced by AdminHandler::get_sysinfo().

static Version::requires_upgrade (  )  [static]

Determine if the database needs to be updated based on the source database version being newer than the schema last applied to the database

Returns:
boolean True if an update is needed

Definition at line 78 of file version.php.

static Version::save_dbversion (  )  [static]

Store the current database version in the options table

Definition at line 68 of file version.php.

Referenced by InstallHandler::upgrade_db().


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