Source for file tangra_module_release.class.php
Documentation is available at tangra_module_release.class.php
* Contains class Tangra_Module_Release
* @subpackage modules_manager
require_once(TANGRA_MAIN_DIR. 'nls/date.inc.php');
* @subpackage modules_manager
* URL of module info page
* Minimal requirement for tangra_lib version
* Minimal requirement for PHP version
if (ereg("^([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2})([A-Za-z]{1,5}[0-9]{0,2})?$", trim($version))) {
throw new Tangra_Exception("Invalid version literal: $version. Must conform: ^([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2})([A-Za-z]{1,5}[0-9]{0,2})?$");
* @param string $description
* Sets maintainer's email
* @param string $maintainer
//TODO check if maintainer field comforms RFC822, i.e. name <email address>
* Gets maintainer's email
* Sets required minimal version of tangra_lib
* @param string $requires_tangra_lib_version
if (ereg("^([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2})([A-Za-z]{1,5}[0-9]{0,2})?$", trim($requires_tangra_lib_version))) {
throw new Tangra_Exception("Invalid requires_tangra_lib_version literal: $requires_tangra_lib_version. Must conform: ^([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2})([A-Za-z]{1,5}[0-9]{0,2})?$");
* Gets required minimal version of tangra_lib
* Sets required minimal version of PHP
* @param string $requires_php_version
if (ereg("^([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2})([A-Za-z]{1,5}[0-9]{0,2})?$", trim($requires_php_version))) {
throw new Tangra_Exception("Invalid requires_php_version literal: $requires_php_version. Must conform: ^([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2})([A-Za-z]{1,5}[0-9]{0,2})?$");
* Gets required minimal version of PHP
* @param booleand $online
$this->online = $online ? true : false;
* @param string $release_date Date of the release
if ($release_date != '0000-00-00') {
throw new Tangra_Exception('Invalid release date.');
|