Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

version.php
Go to the documentation of this file.
1 <?php
16 class eZPublishSDK
17 {
18 const VERSION_MAJOR = 2;
19 const VERSION_MINOR = 4.0;
20 const VERSION_RELEASE = 0.1;
21 const VERSION_STATE = 'stable';
22 const VERSION_DEVELOPMENT = false;
23 const VERSION_ALIAS = '2.4.0.1';
24 const EDITION = 'Exponential Basic';
25
31 static function version( $withRelease = true, $asAlias = false, $withState = true )
32 {
33 if ( $asAlias )
34 {
35 $versionText = eZPublishSDK::alias();
36 if ( $withState && eZPublishSDK::state() )
37 $versionText .= "-" . eZPublishSDK::state();
38 }
39 else
40 {
41 $versionText = eZPublishSDK::majorVersion() . '.' . eZPublishSDK::minorVersion();
42 // $development = eZPublishSDK::developmentVersion();
43 // if ( $development !== false )
44 // $versionText .= '.' . $development;
45 if ( $withRelease )
46 $versionText .= "." . eZPublishSDK::release();
47 if ( $withState )
48 $versionText .= eZPublishSDK::state();
49 }
50 return $versionText;
51 }
52
56 static function majorVersion()
57 {
58 return eZPublishSDK::VERSION_MAJOR;
59 }
60
64 static function minorVersion()
65 {
66 return eZPublishSDK::VERSION_MINOR;
67 }
68
72 static function state()
73 {
74 return eZPublishSDK::VERSION_STATE;
75 }
76
80 static function developmentVersion()
81 {
82 return eZPublishSDK::VERSION_DEVELOPMENT;
83 }
84
88 static function release()
89 {
90 return eZPublishSDK::VERSION_RELEASE;
91 }
92
96 static function alias()
97 {
98 return eZPublishSDK::VERSION_ALIAS;
99 }
100
105 static function databaseVersion( $withRelease = true )
106 {
107 $db = eZDB::instance();
108 $rows = $db->arrayQuery( "SELECT value as version FROM ezsite_data WHERE name='ezpublish-version'" );
109 $version = false;
110 if ( count( $rows ) > 0 )
111 {
112 $version = $rows[0]['version'];
113 if ( $withRelease )
114 {
115 $release = eZPublishSDK::databaseRelease();
116 $version .= '-' . $release;
117 }
118 }
119 return $version;
120 }
121
125 static function databaseRelease()
126 {
127 $db = eZDB::instance();
128 $rows = $db->arrayQuery( "SELECT value as release FROM ezsite_data WHERE name='ezpublish-release'" );
129 $release = false;
130 if ( count( $rows ) > 0 )
131 {
132 $release = $rows[0]['release'];
133 }
134 return $release;
135 }
136 }
137
138 ?>
eZPublishSDK
contains the eZ Publish SDK version.
Definition: version.php:17
eZPublishSDK\VERSION_RELEASE
const VERSION_RELEASE
Definition: version.php:20
eZPublishSDK\minorVersion
static minorVersion()
Definition: version.php:64
eZPublishSDK\alias
static alias()
Definition: version.php:96
eZPublishSDK\VERSION_MAJOR
const VERSION_MAJOR
Definition: version.php:18
eZPublishSDK\VERSION_STATE
const VERSION_STATE
Definition: version.php:21
eZPublishSDK\databaseRelease
static databaseRelease()
Definition: version.php:125
eZPublishSDK\majorVersion
static majorVersion()
Definition: version.php:56
eZPublishSDK\version
static version( $withRelease=true, $asAlias=false, $withState=true)
Definition: version.php:31
eZPublishSDK\EDITION
const EDITION
Definition: version.php:24
eZPublishSDK\VERSION_DEVELOPMENT
const VERSION_DEVELOPMENT
Definition: version.php:22
eZPublishSDK\developmentVersion
static developmentVersion()
Definition: version.php:80
eZPublishSDK\state
static state()
Definition: version.php:72
eZPublishSDK\VERSION_MINOR
const VERSION_MINOR
Definition: version.php:19
eZPublishSDK\release
static release()
Definition: version.php:88
eZPublishSDK\VERSION_ALIAS
const VERSION_ALIAS
Definition: version.php:23
eZPublishSDK\databaseVersion
static databaseVersion( $withRelease=true)
Definition: version.php:105
$version
$version
Definition: ezabout/user/datasupplier.php:29
$db
$db
Definition: ezarticle/user/authorlist.php:53
$rows
$rows
Definition: frontpage.php:128
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.