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:
authorsgiehl <stefan@piwik.org>2015-01-14 20:32:57 +0300
committersgiehl <stefan@piwik.org>2015-01-14 20:32:57 +0300
commite3d08e625373ad8e338116ea3fde4d2845dd8980 (patch)
tree40c3fce131d687f27ceaf9b91102ef907fe334b7 /core/Version.php
parent9361e054479461d24c5c89d318d6146ee680b9a6 (diff)
parentfbf09b13be81a91a3c08830537031b0058dcf928 (diff)
Merge branch 'master' into move_language_report
Conflicts: core/Version.php
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 179d6fd541..eab5ff373f 100644
--- a/core/Version.php
+++ b/core/Version.php
@@ -21,4 +21,20 @@ final class Version
* @var string
*/
const VERSION = '2.11.0-b3';
+
+ 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);
+ }
+
}