1235ace4564e48b9d3b83c77aed24edebc77edb2
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Resources / PHP / TYPO3.Flow / Classes / TYPO3 / Flow / Package / MetaData / SystemConstraint.php
1 <?php
2 namespace TYPO3\Flow\Package\MetaData;
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
14
15 /**
16 * System constraint meta model
17 *
18 */
19 class SystemConstraint extends \TYPO3\Flow\Package\MetaData\AbstractConstraint {
20
21 /**
22 * The type for a system scope constraint (e.g. "Memory")
23 *
24 * @var string
25 */
26 protected $type;
27
28 /**
29 * Meta data system constraint constructor
30 *
31 * @param string $constraintType
32 * @param string $type
33 * @param string $value
34 * @param string $minVersion
35 * @param string $maxVersion
36 */
37 public function __construct($constraintType, $type, $value = NULL, $minVersion = NULL, $maxVersion = NULL) {
38 if (!strlen($value)) {
39 $value = NULL;
40 }
41 parent::__construct($constraintType, $value, $minVersion, $maxVersion);
42 $this->type = $type;
43 }
44
45 /**
46 * @return string The system constraint type
47 */
48 public function getType() {
49 return $this->type;
50 }
51
52 /**
53 * @return string The constraint scope
54 * @see \TYPO3\Flow\Package\MetaData\Constraint\getConstraintScope()
55 */
56 public function getConstraintScope() {
57 return \TYPO3\Flow\Package\MetaDataInterface::CONSTRAINT_SCOPE_SYSTEM;
58 }
59 }
60 ?>