TYPO3 CMS  TYPO3_6-2
MetaData.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\Flow\Package;
3 
4 /* *
5  * This script belongs to the TYPO3 Flow framework. *
6  * *
7  * It is free software; you can redistribute it and/or modify it under *
8  * the terms of the GNU Lesser General Public License, either version 3 *
9  * of the License, or (at your option) any later version. *
10  * *
11  * The TYPO3 project - inspiring people to share! *
12  * */
13 
19 
23  protected static $CONSTRAINT_TYPES = array(self::CONSTRAINT_TYPE_DEPENDS, self::CONSTRAINT_TYPE_CONFLICTS, self::CONSTRAINT_TYPE_SUGGESTS);
24 
28  protected $packageKey;
29 
35  protected $packageType;
36 
41  protected $version;
42 
47  protected $title;
48 
53  protected $description;
54 
59  protected $categories = array();
60 
65  protected $parties = array();
66 
71  protected $constraints = array();
72 
78  public function getConstraintTypes() {
79  return self::$CONSTRAINT_TYPES;
80  }
81 
87  public function __construct($packageKey) {
88  $this->packageKey = $packageKey;
89  }
90 
94  public function getPackageKey() {
95  return $this->packageKey;
96  }
97 
103  public function getPackageType() {
104  return $this->packageType;
105  }
106 
112  public function setPackageType($packageType) {
113  $this->packageType = $packageType;
114  }
115 
119  public function getVersion() {
120  return $this->version;
121  }
122 
127  public function setVersion($version) {
128  $this->version = $version;
129  }
130 
134  public function getDescription() {
135  return $this->description;
136  }
137 
142  public function setDescription($description) {
143  $this->description = $description;
144  }
145 
149  public function getCategories() {
150  return $this->categories;
151  }
152 
159  public function addCategory($category) {
160  $this->categories[] = $category;
161  }
162 
166  public function getParties() {
167  return $this->parties;
168  }
169 
176  public function addParty(\TYPO3\Flow\Package\MetaData\AbstractParty $party) {
177  $this->parties[] = $party;
178  }
179 
185  public function getConstraints() {
186  return $this->constraints;
187  }
188 
195  public function getConstraintsByType($constraintType) {
196  if (!isset($this->constraints[$constraintType])) {
197  return array();
198  }
199  return $this->constraints[$constraintType];
200  }
201 
208  public function addConstraint(\TYPO3\Flow\Package\MetaData\AbstractConstraint $constraint) {
209  $this->constraints[$constraint->getConstraintType()][] = $constraint;
210  }
211 }
212 ?>
getConstraintsByType($constraintType)
Definition: MetaData.php:195
__construct($packageKey)
Definition: MetaData.php:87
addParty(\TYPO3\Flow\Package\MetaData\AbstractParty $party)
Definition: MetaData.php:176
setPackageType($packageType)
Definition: MetaData.php:112
addConstraint(\TYPO3\Flow\Package\MetaData\AbstractConstraint $constraint)
Definition: MetaData.php:208
setDescription($description)
Definition: MetaData.php:142