diff options
author | sgiehl <stefan@piwik.org> | 2015-01-14 20:32:57 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-01-14 20:32:57 +0300 |
commit | e3d08e625373ad8e338116ea3fde4d2845dd8980 (patch) | |
tree | 40c3fce131d687f27ceaf9b91102ef907fe334b7 /core/Version.php | |
parent | 9361e054479461d24c5c89d318d6146ee680b9a6 (diff) | |
parent | fbf09b13be81a91a3c08830537031b0058dcf928 (diff) |
Merge branch 'master' into move_language_report
Conflicts:
core/Version.php
Diffstat (limited to 'core/Version.php')
-rw-r--r-- | core/Version.php | 16 |
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); + } + } |