‪TYPO3CMS  10.4
MajorRelease.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 ‪$version;
23  protected ‪$lts;
24  protected ‪$title;
26 
28  {
29  $this->version = ‪$version;
30  $this->lts = ‪$lts;
31  $this->title = ‪$title;
32  $this->maintenanceWindow = ‪$maintenanceWindow;
33  }
34 
35  public static function ‪fromApiResponse(array $response): self
36  {
38  $ltsVersion = isset($response['lts']) ? (string)$response['lts'] : null;
39 
40  return new self((string)$response['version'], $ltsVersion, $response['title'], ‪$maintenanceWindow);
41  }
42 
43  public function ‪getVersion(): string
44  {
45  return ‪$this->version;
46  }
47 
48  public function ‪getLts(): ?string
49  {
50  return ‪$this->lts;
51  }
52 
53  public function ‪getTitle(): string
54  {
55  return ‪$this->title;
56  }
57 
59  {
61  }
62 }
‪TYPO3\CMS\Install\CoreVersion\MajorRelease\getMaintenanceWindow
‪getMaintenanceWindow()
Definition: MajorRelease.php:58
‪TYPO3\CMS\Install\CoreVersion\MajorRelease\$lts
‪$lts
Definition: MajorRelease.php:23
‪TYPO3\CMS\Install\CoreVersion
Definition: CoreRelease.php:18
‪TYPO3\CMS\Install\CoreVersion\MajorRelease\getLts
‪getLts()
Definition: MajorRelease.php:48
‪TYPO3\CMS\Install\CoreVersion\MajorRelease\fromApiResponse
‪static fromApiResponse(array $response)
Definition: MajorRelease.php:35
‪TYPO3\CMS\Install\CoreVersion\MaintenanceWindow
Definition: MaintenanceWindow.php:21
‪TYPO3\CMS\Install\CoreVersion\MajorRelease\getTitle
‪getTitle()
Definition: MajorRelease.php:53
‪TYPO3\CMS\Install\CoreVersion\MajorRelease\$version
‪$version
Definition: MajorRelease.php:22
‪TYPO3\CMS\Install\CoreVersion\MajorRelease\$maintenanceWindow
‪$maintenanceWindow
Definition: MajorRelease.php:25
‪TYPO3\CMS\Install\CoreVersion\MaintenanceWindow\fromApiResponse
‪static fromApiResponse(array $response)
Definition: MaintenanceWindow.php:31
‪TYPO3\CMS\Install\CoreVersion\MajorRelease\$title
‪$title
Definition: MajorRelease.php:24
‪TYPO3\CMS\Install\CoreVersion\MajorRelease\__construct
‪__construct(string $version, ?string $lts, string $title, MaintenanceWindow $maintenanceWindow)
Definition: MajorRelease.php:27
‪TYPO3\CMS\Install\CoreVersion\MajorRelease
Definition: MajorRelease.php:21
‪TYPO3\CMS\Install\CoreVersion\MajorRelease\getVersion
‪getVersion()
Definition: MajorRelease.php:43