Class CriticalI_Package_Version

Description

A Version is the most granular form of a package. It represents a single installed version.

Located in /Core/lib/CriticalI/Package/Version.php (line 10)


	
			
Direct descendents
Class Description
 class CriticalI_Project_PackageVersion CriticalI_Project_PackageVersion is a CriticalI_Package_Version that has been installed within a project.
 class CriticalI_Remote_PackageVersion CriticalI_Remote_PackageVersion is a CriticalI_Package_Version that is available from one or more remote repositories.
Variable Summary
 mixed $directory
 mixed $major
 mixed $minor
 mixed $package
 mixed $properties
 mixed $revision
Method Summary
 static array canonify_version (string $ver)
 static void compare_versions ( $a,  $b)
 static void compare_version_arrays ( $a,  $b)
 static void compare_version_strings ( $a,  $b)
 CriticalI_Package_Version __construct (CriticalI_Package $package, int $major, int $minor, int $revision, string $dir)
 int compare_version_number (array $ver)
 int compare_version_specification (CriticalI_Pacakge_VersionSpec $ver)
 mixed property (string $name, [mixed $default = null])
 array version ()
 string version_string ()
Variables
mixed $directory (line 15)
  • access: protected
mixed $major (line 12)
  • access: protected
mixed $minor (line 13)
  • access: protected
mixed $package (line 11)
  • access: protected
mixed $properties (line 16)
  • access: protected
mixed $revision (line 14)
  • access: protected
Methods
static canonify_version (line 155)

Utility function to return the canonical three-part version number

from a string

  • access: public
array canonify_version (string $ver)
  • string $ver: The version string to canonify
static canonify_version_specification (line 171)

Returns a comparable version spec object given a version dependency string. See CriticalI_Package::satisify_dependency for formation information.

  • access: public
CriticalI_Package_VersionSpec canonify_version_specification (string $version)
  • string $version: The version dependency string
static compare_versions (line 178)

Comparison function for sorting Version objects

  • access: public
void compare_versions ( $a,  $b)
  • $a
  • $b
static compare_version_arrays (line 192)

Comparison function for sorting canonified version arrays

  • access: public
void compare_version_arrays ( $a,  $b)
  • $a
  • $b
static compare_version_strings (line 185)

Comparison function for sorting version strings

  • access: public
void compare_version_strings ( $a,  $b)
  • $a
  • $b
Constructor __construct (line 27)

Constructor

  • access: public
CriticalI_Package_Version __construct (CriticalI_Package $package, int $major, int $minor, int $revision, string $dir)
  • CriticalI_Package $package: The containing package
  • int $major: Major version number
  • int $minor: Minor version number
  • int $revision: Revision number
  • string $dir: Installation directory, relative to CRITICALI_ROOT

Redefined in descendants as:
compare_version_number (line 89)

Compares a canonified version array to this version. Returns -1, 0, or -1 when this version is less than, equal, or greater than the supplied version, respectively.

  • access: public
int compare_version_number (array $ver)
  • array $ver: The version number to compare
compare_version_specification (line 112)

Compares a canonified version dependency specification to this version. Returns -1, 0, or -1 when this version is less than, within, or greater than the specified range, respectively.

  • access: public
int compare_version_specification (CriticalI_Pacakge_VersionSpec $ver)
  • CriticalI_Pacakge_VersionSpec $ver: The version specification to compare
installation_directory (line 48)

Return the installation directory (relative to CRITICALI_ROOT)

  • access: public
string installation_directory ()
package (line 40)

Return the containing package

  • access: public
CriticalI_Package package ()
property (line 59)

Return the value of a property for this package version

  • access: public
mixed property (string $name, [mixed $default = null])
  • string $name: The name of the property to retrieve
  • mixed $default: The default value for the property if not found
version (line 70)

Return the version number as an array with three elements (major, minor, and revision numbers).

  • access: public
array version ()
version_string (line 78)

Return the version number as a string.

  • access: public
string version_string ()

Documentation generated on Wed, 25 Apr 2012 09:46:46 -0700 by phpDocumentor 1.4.3