‪TYPO3CMS  ‪main
Typo3Version.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
21 {
22  protected const ‪VERSION = '13.1.0-dev';
23  protected const ‪BRANCH = '13.1';
24 
25  public function ‪getVersion(): string
26  {
27  return static::VERSION;
28  }
29 
30  public function ‪getBranch(): string
31  {
32  return static::BRANCH;
33  }
34 
40  public function ‪getMajorVersion(): int
41  {
42  [$explodedVersion] = explode('.', static::VERSION);
43  return (int)$explodedVersion;
44  }
45 
46  public function ‪__toString(): string
47  {
48  return $this->‪getVersion();
49  }
50 }
‪TYPO3\CMS\Core\Information\Typo3Version\__toString
‪__toString()
Definition: Typo3Version.php:46
‪TYPO3\CMS\Core\Information\Typo3Version
Definition: Typo3Version.php:21
‪TYPO3\CMS\Core\Information
Definition: Typo3Information.php:18
‪TYPO3\CMS\Core\Information\Typo3Version\BRANCH
‪const BRANCH
Definition: Typo3Version.php:23
‪TYPO3\CMS\Core\Information\Typo3Version\getVersion
‪getVersion()
Definition: Typo3Version.php:25
‪TYPO3\CMS\Core\Information\Typo3Version\VERSION
‪const VERSION
Definition: Typo3Version.php:22
‪TYPO3\CMS\Core\Information\Typo3Version\getBranch
‪getBranch()
Definition: Typo3Version.php:30
‪TYPO3\CMS\Core\Information\Typo3Version\getMajorVersion
‪int getMajorVersion()
Definition: Typo3Version.php:40