Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-01-14 02:07:30 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-01-14 02:07:30 +0300
commit7d15ca9a8cbcd1ee5d44a8a8db17f4d88bd66b37 (patch)
tree43db2a6549ab6e14752abc961410589d0ce6e97e /core/Version.php
parent38c811e72aeb6bbbd2de5258f7435102889670d1 (diff)
refs #6706 add link to changelog in case update is a stable update
Diffstat (limited to 'core/Version.php')
-rw-r--r--core/Version.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/Version.php b/core/Version.php
index 393f081a15..27be60d8ce 100644
--- a/core/Version.php
+++ b/core/Version.php
@@ -21,4 +21,20 @@ final class Version
* @var string
*/
const VERSION = '2.11.0-b2';
+
+ public function isStableVersion($version)
+ {
+ return (bool) preg_match('/^(\d+)\.(\d+)\.(\d+)$/', $version);
+ }
+
+ public function isVersionNumber($version)
+ {
+ return $this->isStableVersion($version) || $this->isNonStableVersion($version);
+ }
+
+ private function isNonStableVersion($version)
+ {
+ return (bool) preg_match('/^(\d+)\.(\d+)\.(\d+)-.{1,4}(\d+)$/', $version);
+ }
+
}