[CLEANUP] The correct case must be used for standard PHP types in phpdoc
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Package / PackageInterface.php
1 <?php
2 namespace TYPO3\CMS\Core\Package;
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
17 /**
18 * Interface for a TYPO3 Package class
19 * Adapted from FLOW for TYPO3 CMS
20 */
21 interface PackageInterface
22 {
23 const PATTERN_MATCH_PACKAGEKEY = '/^[a-z0-9]+\.(?:[a-z0-9][\.a-z0-9]*)+$/i';
24
25 const PATTERN_MATCH_EXTENSIONKEY = '/^[0-9a-z_-]+$/i';
26
27 /**
28 * @return array
29 */
30 public function getPackageReplacementKeys();
31
32 /**
33 * Tells if the package is part of the default factory configuration
34 * and therefor activated at first installation.
35 *
36 * @return bool
37 */
38 public function isPartOfFactoryDefault();
39
40 /**
41 * Tells if the package is required for a minimal usable (backend) system
42 * and therefor activated if PackageStates is created from scratch for
43 * whatever reason.
44 *
45 * @return bool
46 */
47 public function isPartOfMinimalUsableSystem();
48
49 /**
50 * Returns contents of Composer manifest - or part there of if a key is given.
51 *
52 * @param string $key Optional. Only return the part of the manifest indexed by 'key'
53 * @return mixed|null
54 * @see json_decode for return values
55 */
56 public function getValueFromComposerManifest($key = null);
57
58 /**
59 * Returns the package meta object of this package.
60 *
61 * @return MetaData
62 */
63 public function getPackageMetaData();
64
65 /**
66 * Returns the package key of this package.
67 *
68 * @return string
69 * @api
70 */
71 public function getPackageKey();
72
73 /**
74 * Tells if this package is protected and therefore cannot be deactivated or deleted
75 *
76 * @return bool
77 * @api
78 */
79 public function isProtected();
80
81 /**
82 * Sets the protection flag of the package
83 *
84 * @param bool $protected TRUE if the package should be protected, otherwise FALSE
85 * @api
86 */
87 public function setProtected($protected);
88
89 /**
90 * Returns the full path to this package's main directory
91 *
92 * @return string Path to this package's main directory
93 * @api
94 */
95 public function getPackagePath();
96 }