‪TYPO3CMS  10.4
MetaData.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 
24 {
25  const ‪CONSTRAINT_TYPE_DEPENDS = 'depends';
26  const ‪CONSTRAINT_TYPE_CONFLICTS = 'conflicts';
27  const ‪CONSTRAINT_TYPE_SUGGESTS = 'suggests';
28 
33 
37  protected ‪$packageKey;
38 
44  protected ‪$packageType;
45 
50  protected ‪$version;
51 
56  protected ‪$title;
57 
62  protected ‪$description;
63 
68  protected ‪$constraints = [];
69 
75  public function ‪getConstraintTypes()
76  {
78  }
79 
85  public function ‪__construct(‪$packageKey)
86  {
87  $this->packageKey = ‪$packageKey;
88  }
89 
93  public function ‪getPackageKey()
94  {
95  return ‪$this->packageKey;
96  }
97 
103  public function ‪getPackageType()
104  {
105  return ‪$this->packageType;
106  }
107 
113  public function ‪setPackageType(‪$packageType)
114  {
115  $this->packageType = ‪$packageType;
116  }
117 
121  public function ‪getVersion()
122  {
123  return ‪$this->version;
124  }
125 
129  public function ‪setVersion(‪$version)
130  {
131  $this->version = ‪$version;
132  }
133 
137  public function ‪getDescription()
138  {
139  return ‪$this->description;
140  }
141 
145  public function ‪setDescription(‪$description)
146  {
147  $this->description = ‪$description;
148  }
149 
155  public function ‪getConstraints()
156  {
157  return ‪$this->constraints;
158  }
159 
166  public function ‪getConstraintsByType($constraintType)
167  {
168  if (!isset($this->constraints[$constraintType])) {
169  return [];
170  }
171  return $this->constraints[$constraintType];
172  }
173 
179  public function ‪addConstraint(‪PackageConstraint $constraint)
180  {
181  $this->constraints[$constraint->‪getConstraintType()][] = $constraint;
182  }
183 }
‪TYPO3\CMS\Core\Package\MetaData\getDescription
‪string getDescription()
Definition: MetaData.php:130
‪TYPO3\CMS\Core\Package\MetaData\PackageConstraint\getConstraintType
‪string getConstraintType()
Definition: PackageConstraint.php:70
‪TYPO3\CMS\Core\Package\MetaData\setDescription
‪setDescription($description)
Definition: MetaData.php:138
‪TYPO3\CMS\Core\Package\MetaData\$version
‪string $version
Definition: MetaData.php:46
‪TYPO3\CMS\Core\Package\MetaData\getConstraintsByType
‪array getConstraintsByType($constraintType)
Definition: MetaData.php:159
‪TYPO3\CMS\Core\Package\MetaData\getConstraints
‪array getConstraints()
Definition: MetaData.php:148
‪TYPO3\CMS\Core\Package\MetaData\$constraints
‪array $constraints
Definition: MetaData.php:61
‪TYPO3\CMS\Core\Package\MetaData\getPackageKey
‪string getPackageKey()
Definition: MetaData.php:86
‪TYPO3\CMS\Core\Package\MetaData\$description
‪string $description
Definition: MetaData.php:56
‪TYPO3\CMS\Core\Package\MetaData\$CONSTRAINT_TYPES
‪static array $CONSTRAINT_TYPES
Definition: MetaData.php:31
‪TYPO3\CMS\Core\Package\MetaData\CONSTRAINT_TYPE_SUGGESTS
‪const CONSTRAINT_TYPE_SUGGESTS
Definition: MetaData.php:27
‪TYPO3\CMS\Core\Package\MetaData\getPackageType
‪string getPackageType()
Definition: MetaData.php:96
‪TYPO3\CMS\Core\Package\MetaData\CONSTRAINT_TYPE_CONFLICTS
‪const CONSTRAINT_TYPE_CONFLICTS
Definition: MetaData.php:26
‪TYPO3\CMS\Core\Package\MetaData\__construct
‪__construct($packageKey)
Definition: MetaData.php:78
‪TYPO3\CMS\Core\Package\MetaData\$title
‪string $title
Definition: MetaData.php:51
‪TYPO3\CMS\Core\Package\MetaData\setVersion
‪setVersion($version)
Definition: MetaData.php:122
‪TYPO3\CMS\Core\Package\MetaData\PackageConstraint
Definition: PackageConstraint.php:22
‪TYPO3\CMS\Core\Package\MetaData\setPackageType
‪setPackageType($packageType)
Definition: MetaData.php:106
‪TYPO3\CMS\Core\Package\MetaData\addConstraint
‪addConstraint(PackageConstraint $constraint)
Definition: MetaData.php:172
‪TYPO3\CMS\Core\Package\MetaData\getVersion
‪string getVersion()
Definition: MetaData.php:114
‪TYPO3\CMS\Core\Package\MetaData\$packageKey
‪string $packageKey
Definition: MetaData.php:35
‪TYPO3\CMS\Core\Package\MetaData\$packageType
‪string $packageType
Definition: MetaData.php:41
‪TYPO3\CMS\Core\Package
Definition: AbstractServiceProvider.php:18
‪TYPO3\CMS\Core\Package\MetaData
Definition: MetaData.php:24
‪TYPO3\CMS\Core\Package\MetaData\CONSTRAINT_TYPE_DEPENDS
‪const CONSTRAINT_TYPE_DEPENDS
Definition: MetaData.php:25
‪TYPO3\CMS\Core\Package\MetaData\getConstraintTypes
‪array getConstraintTypes()
Definition: MetaData.php:68