src/version/Version.class.php
public function parse_version_file($pathToFile, $asArray=false) {
		$foundIt = 0;
		if(file_exists($pathToFile)) {
			
			$lines = explode("\n", file_get_contents($pathToFile));
			
			foreach($lines as $lineData) {
				if(strlen($lineData) && preg_match('/(^[A-Z]{3,}):(.+)/', $lineData)) {
					$theBits = explode(': ', $lineData, 2);
					
					
					switch(strtolower($theBits[0])) {
						case 'project':
							$this->_projectName = trim($theBits[1]);
							break;
						case 'version':
							$versionInfo = self::parse_version_string($theBits[1]);
							$fullVersionString = self::build_full_version_string($versionInfo);
							
							if($asArray) {
								$retval = $versionInfo;
								$retval['version_string'] = $fullVersionString;
							}
							else {
								$retval = $fullVersionString;
							}
							$foundIt++;
							break;
					}
				}
			}
			
			if($foundIt !== 1) {
				throw new \Exception("no version found");
			}
		}
		else {
			throw new \Exception(__METHOD__ .": failed to retrieve version information, file ({$pathToFile}) does not exist");
		}
		
		return $retval;
	}
public function parse_version_file($pathToFile, $asArray=false) {
		$foundIt = 0;
		if(file_exists($pathToFile)) {
			
			$lines = explode("\n", file_get_contents($pathToFile));
			
			foreach($lines as $lineData) {
				if(strlen($lineData) && preg_match('/(^[A-Z]{3,}):(.+)/', $lineData)) {
					$theBits = explode(': ', $lineData, 2);
					
					
					switch(strtolower($theBits[0])) {
						case 'project':
							$this->_projectName = trim($theBits[1]);
							break;
						case 'version':
							$versionInfo = self::parse_version_string($theBits[1]);
							$fullVersionString = self::build_full_version_string($versionInfo);
							
							if($asArray) {
								$retval = $versionInfo;
								$retval['version_string'] = $fullVersionString;
							}
							else {
								$retval = $fullVersionString;
							}
							$foundIt++;
							break;
					}
				}
			}
			
			if($foundIt !== 1) {
				throw new \Exception("no version found");
			}
		}
		else {
			throw new \Exception(__METHOD__ .": failed to retrieve version information, file ({$pathToFile}) does not exist");
		}
		
		return $retval;
	}
=========================================================================