NewsFeaturesDownloadsDevelopmentSupportAbout Us

lifetype-1.2/class/misc/version.class.php File Reference

Go to the source code of this file.


Enumerations

enum  LIFETYPE_PROJECT_PAGE
enum  LIFETYPE_DEFAULT_VERSION_FEED
enum  LIFETYPE_DEFAULT_PLUGIN_VERSION_FEED

Functions

 getProjectPage ()
 getLifetypeVersionFeed ()
 getPluginVersionFeed ()
 isDevelopment ($version="")
 compare ($v1, $v2)
 isNewer ($v1, $v2="")

Variables

 $versionFile = PLOG_CLASS_PATH."version.php"
 $version = "undefined"

Enumeration Type Documentation

This needs to be udpated after every major release, so that the plugin feed is fetched from the right place

Definition at line 18 of file version.class.php.

This needs to be udpated after every major release, so that the version feed is fetched from the right place

Definition at line 12 of file version.class.php.

URL pointing to the project page

Definition at line 6 of file version.class.php.


Function Documentation

compare ( v1,
v2 
) [static]

Compares two LT versions

Parameters:
v1 
v2 
Returns:
1 if v1>v2, 0 if v1==v2 and -1 if v1<v2
See also:
http://www.php.net/manual/en/function.version-compare.php

Definition at line 109 of file version.class.php.

Referenced by isNewer(), and Version_Test.testVersionCompare().

getLifetypeVersionFeed (  )  [static]

Returns the link to the current Lifetype version feed

Definition at line 72 of file version.class.php.

Referenced by AdminVersionCheckAction.perform().

getPluginVersionFeed (  )  [static]

Returns the link to the current Lifetype version feed

Definition at line 82 of file version.class.php.

Referenced by AdminPluginCenterAction.perform().

getProjectPage (  )  [static]

Returns the official page of the project.

Returns:
The official project page.

Definition at line 62 of file version.class.php.

isDevelopment ( version = ""  )  [static]

Returns true if the current version is a development version

Definition at line 92 of file version.class.php.

References $version.

isNewer ( v1,
v2 = "" 
)

Returns true if the given version is newer than the current one

Parameters:
v1 The version that we'd like to compare to
v1 If specified, the version that we should check whether it's older than v1 or not. If not specified, the current version will be used.
Returns:
True if the given version is newer than the current one or false otherwise

Definition at line 142 of file version.class.php.

References compare().

Referenced by AdminVersionCheckAction.perform(), and Version_Test.testIsNewer().


Variable Documentation

$versionFile = PLOG_CLASS_PATH."version.php"

Definition at line 44 of file version.class.php.