‪TYPO3CMS  9.5
MetaData.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
21 {
22  const ‪CONSTRAINT_TYPE_DEPENDS = 'depends';
23  const ‪CONSTRAINT_TYPE_CONFLICTS = 'conflicts';
24  const ‪CONSTRAINT_TYPE_SUGGESTS = 'suggests';
25 
30 
34  protected ‪$packageKey;
35 
41  protected ‪$packageType;
42 
47  protected ‪$version;
48 
53  protected ‪$title;
54 
59  protected ‪$description;
60 
65  protected ‪$constraints = [];
66 
72  public function ‪getConstraintTypes()
73  {
75  }
76 
82  public function ‪__construct(‪$packageKey)
83  {
84  $this->packageKey = ‪$packageKey;
85  }
86 
90  public function ‪getPackageKey()
91  {
92  return ‪$this->packageKey;
93  }
94 
100  public function ‪getPackageType()
101  {
102  return ‪$this->packageType;
103  }
104 
110  public function ‪setPackageType(‪$packageType)
111  {
112  $this->packageType = ‪$packageType;
113  }
114 
118  public function ‪getVersion()
119  {
120  return ‪$this->version;
121  }
122 
126  public function ‪setVersion(‪$version)
127  {
128  $this->version = ‪$version;
129  }
130 
134  public function ‪getDescription()
135  {
136  return ‪$this->description;
137  }
138 
142  public function ‪setDescription(‪$description)
143  {
144  $this->description = ‪$description;
145  }
146 
152  public function ‪getConstraints()
153  {
154  return ‪$this->constraints;
155  }
156 
163  public function ‪getConstraintsByType($constraintType)
164  {
165  if (!isset($this->constraints[$constraintType])) {
166  return [];
167  }
168  return $this->constraints[$constraintType];
169  }
170 
176  public function ‪addConstraint(‪MetaData\PackageConstraint $constraint)
177  {
178  $this->constraints[$constraint->getConstraintType()][] = $constraint;
179  }
180 }
‪TYPO3\CMS\Core\Package\MetaData\getDescription
‪string getDescription()
Definition: MetaData.php:127
‪TYPO3\CMS\Core\Package\MetaData\setDescription
‪setDescription($description)
Definition: MetaData.php:135
‪TYPO3\CMS\Core\Package\MetaData\$version
‪string $version
Definition: MetaData.php:43
‪TYPO3\CMS\Core\Package\MetaData\getConstraintsByType
‪array getConstraintsByType($constraintType)
Definition: MetaData.php:156
‪TYPO3\CMS\Core\Package\MetaData\getConstraints
‪array getConstraints()
Definition: MetaData.php:145
‪TYPO3\CMS\Core\Package\MetaData\$constraints
‪array $constraints
Definition: MetaData.php:58
‪TYPO3\CMS\Core\Package\MetaData\addConstraint
‪addConstraint(MetaData\PackageConstraint $constraint)
Definition: MetaData.php:169
‪TYPO3\CMS\Core\Package\MetaData\getPackageKey
‪string getPackageKey()
Definition: MetaData.php:83
‪TYPO3\CMS\Core\Package\MetaData\$description
‪string $description
Definition: MetaData.php:53
‪TYPO3\CMS\Core\Package\MetaData\$CONSTRAINT_TYPES
‪static array $CONSTRAINT_TYPES
Definition: MetaData.php:28
‪TYPO3\CMS\Core\Package\MetaData\CONSTRAINT_TYPE_SUGGESTS
‪const CONSTRAINT_TYPE_SUGGESTS
Definition: MetaData.php:24
‪TYPO3\CMS\Core\Package\MetaData\getPackageType
‪string getPackageType()
Definition: MetaData.php:93
‪TYPO3\CMS\Core\Package\MetaData\CONSTRAINT_TYPE_CONFLICTS
‪const CONSTRAINT_TYPE_CONFLICTS
Definition: MetaData.php:23
‪TYPO3\CMS\Core\Package\MetaData\__construct
‪__construct($packageKey)
Definition: MetaData.php:75
‪TYPO3\CMS\Core\Package\MetaData\$title
‪string $title
Definition: MetaData.php:48
‪TYPO3\CMS\Core\Package\MetaData\setVersion
‪setVersion($version)
Definition: MetaData.php:119
‪TYPO3\CMS\Core\Package\MetaData\setPackageType
‪setPackageType($packageType)
Definition: MetaData.php:103
‪TYPO3\CMS\Core\Package\MetaData\getVersion
‪string getVersion()
Definition: MetaData.php:111
‪TYPO3\CMS\Core\Package\MetaData\$packageKey
‪string $packageKey
Definition: MetaData.php:32
‪TYPO3\CMS\Core\Package\MetaData\$packageType
‪string $packageType
Definition: MetaData.php:38
‪TYPO3\CMS\Core\Package
Definition: DependencyResolver.php:2
‪TYPO3\CMS\Core\Package\MetaData
Definition: MetaData.php:21
‪TYPO3\CMS\Core\Package\MetaData\CONSTRAINT_TYPE_DEPENDS
‪const CONSTRAINT_TYPE_DEPENDS
Definition: MetaData.php:22
‪TYPO3\CMS\Core\Package\MetaData\getConstraintTypes
‪array getConstraintTypes()
Definition: MetaData.php:65