Class EVSVersion

Description

Implements the possibility of updating a version and creating releases from it.

Located in /code/framework/EVS/EVSVersion.php (line 43)


	
			
Variable Summary
Method Summary
EVSVersion EVSVersion (EVSProject &$project, String $version)
String getChangelog ()
String getPreviousVersion ()
void init ()
void loadConfig ()
boolean makeMajorRelease (String $releaseInfo)
boolean makeMinorRelease (String $releaseInfo)
boolean makePatchlevelRelease (String $releaseInfo)
void saveConfig ([mixed $config = false])
void setPreviousVersion (String $version)
void updateChangelog ()
String _extractMajorVersion (String $version)
String _extractMinorVersion (String $version)
String _extractPatchlevelVersion (String $version)
Variables
Array $config = array() (line 158)

Stores the configuration information from config.ini, README, AUTHORS, RELEASE, INSTALL, FAQ and ddl.sql.

Gets filled by loadConfig.

EVS $evs = null (line 52)

An instance of EVS. Gets set inside the costructor method.

boolean $isCurrentVersion = false (line 72)

Whether it is current version or a release. See the tutorial for details. Gets set inside the costructor method.

boolean $isDevelopmentVersion = false (line 82)

Whether it is a current development version or not. See the tutorial for details. Gets set inside the costructor method.

boolean $isLatestCurrentDevelopmentVersion = false (line 133)

Whether it is the latest current development version. See the tutorial for details. Gets set in the method init.

boolean $isLatestCurrentVersion = false (line 139)

Whether it is the latest current version. See the tutorial for details. Gets set in the method init.

boolean $isLatestDevelopmentRelease = false (line 145)

Whether it is the latest development release. See the tutorial for details. Gets set in the method init.

boolean $isLatestStableRelease = false (line 151)

Whether it is the latest stable release. See the tutorial for details. Gets set in the method init.

boolean $isRelease = false (line 67)

Whether it is a release or a current version. See the tutorial for details. Gets set inside the costructor method.

boolean $isStableVersion = false (line 77)

Whether it is a current stable version or not. See the tutorial for details. Gets set inside the costructor method.

int $major = null (line 87)

The major version number. Gets set inside the costructor method.

int $minor = null (line 92)

The minor version number. Gets set inside the costructor method.

int $nextMajor = null (line 102)

The next major version number. Gets set inside the costructor method.

int $nextMajorReleaseNumber = null (line 117)

The complete version number of the next major release. Gets set inside the costructor method.

int $nextMinor = null (line 107)

The next minor version number. Gets set inside the costructor method.

int $nextMinorReleaseNumber = null (line 122)

The complete version number of the next minor release. Gets set inside the costructor method.

int $nextPatchlevel = null (line 112)

The next patchlevel version number. Gets set inside the costructor method.

int $nextPatchlevelReleaseNumber = null (line 127)

The complete version number of the next patchlevel release. Gets set inside the costructor method.

int $patchlevel = null (line 97)

The patchlevel version number. Gets set inside the costructor method.

EVSProject $project = null (line 47)

An instance of EVSProject. Gets set inside the costructor method.

String $projectDirectory = '' (line 62)

The absolute path to the directory where the version is stored. Gets set inside the costructor method.

String $version (line 57)

The version number or an empty string if the project was not created with versioning support. Gets set inside the costructor method.

Methods
Constructor EVSVersion (line 165)

Constructor method that sets most of the properties.

EVSVersion EVSVersion (EVSProject &$project, String $version)
  • EVSProject $project: An instance of EVSProject passed by reference. This is the project this version is part of.
  • String $version: The version number or an empty string if the project was not created with versioning support.
getChangelog (line 418)

Returns a string containing the ChangeLog for this version.

This method reads in the file VERSION_ROOT/code/RELEASE and appends the return value of getChangelog called on the privious version. To determine which is the previous verison $this->getPreviousVersion() is called.

String getChangelog ()
getPreviousVersion (line 454)

Reads and returns the version number of the previous release from the file VERSION_ROOT/PREVIOUS_RELEASE.

  • return: The contents of VERSION_ROOT/PREVIOUS_RELEASE or an empty string if nonexisting.
String getPreviousVersion ()
init (line 197)

Sets the properties isLatestCurrentVersion, isLatestCurrentDevelopmentVersion, isLatestDevelopmentRelease, isLatestStableRelease.

Calling this method only makes sense after having loaded all versions of the project.

void init ()
loadConfig (line 465)

Loads the configuration information of this version into the associative array $this->config.

Acutally a new instance of RSDEngine is created with $this->versionDirectory as argument. This new instance is used to get the configuration information.

void loadConfig ()
makeMajorRelease (line 265)

Makes a new major release based on this version.

Making new major releases is only possible from the latest current version. See the tutorial for details.

  • return: True on success false on failure (if the project was not created with versioning support or is is not the latest current version).
  • see: EVSVersion::$isLatestCurrentVersion
boolean makeMajorRelease (String $releaseInfo)
  • String $releaseInfo: The release information to be used in the ChangeLog.
makeMinorRelease (line 318)

Makes a new minor release based on this version.

Making new minor releases is only possible from the latest current version. See the tutorial for details.

  • return: True on success false on failure (if the project was not created with versioning support or is is not the latest current version).
  • see: EVSVersion::$isLatestCurrentVersion
boolean makeMinorRelease (String $releaseInfo)
  • String $releaseInfo: The release information to be used in the ChangeLog.
makePatchlevelRelease (line 366)

Makes a new minor release based on this version.

Making new patchlevel releases is only possible from a current versions. See the tutorial for details.

  • return: True on success false on failure (if the project was not created with versioning support or is is not current version).
  • see: EVSVersion::$isCurrentVersion
boolean makePatchlevelRelease (String $releaseInfo)
  • String $releaseInfo: The release information to be used in the ChangeLog.
saveConfig (line 480)

Saves the configuration information of this version.

Acutally a new instance of RSDEngine is created with $this->versionDirectory as argument. This new instance is used to save the configuration information by calling saveConfig.

void saveConfig ([mixed $config = false])
  • mixed $config: An associative array that will be passed to $rsdEngine->saveConfig or false if you wish the configuration stored in $this->config to be saved. This argument is optional. The default is false.
setPreviousVersion (line 445)

Saves the version number of the previous release in the file VERSION_ROOT/PREVIOUS_RELEASE.

void setPreviousVersion (String $version)
  • String $version: The version number of the previous release.
updateChangelog (line 434)

Writes the result of $this->getChangeLog() to the file VERSION_ROOT/code/CHANGELOG

void updateChangelog ()
updateVersionTags (line 400)

Updates all @version tags found in any file under $this->versionDirectory.

void updateVersionTags ()
_extractMajorVersion (line 229)

Returns the major version number from the version number passed as argument.

  • return: The major version number.
  • access: private
String _extractMajorVersion (String $version)
  • String $version: A version number in the format of "$major.$minor.$patchlevel".
_extractMinorVersion (line 240)

Returns the minor version number from the version number passed as argument.

  • return: The minor version number.
  • access: private
String _extractMinorVersion (String $version)
  • String $version: A version number in the format of "$major.$minor.$patchlevel".
_extractPatchlevelVersion (line 251)

Returns the patchlevel version number from the version number passed as argument.

  • return: The patchlevel version number.
  • access: private
String _extractPatchlevelVersion (String $version)
  • String $version: A version number in the format of "$major.$minor.$patchlevel".

Documentation generated on Mon, 8 Dec 2003 13:10:35 +0100 by phpDocumentor 1.2.3