3eeb8647ca8c38843b8751c022f3d89185b6559d
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Dispatcher.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 *
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24
25 /**
26 * This class was the main entry point for extbase extensions before v1.3.0. It was replaced by the class
27 * Tx_Extbase_Bootstrap in combination with the class Tx_Extbase_MVC_Dispatcher to separate responsibilities.
28 *
29 * The use of static functions is deprecated since 1.3.0 and will be removed in 1.5.0.
30 *
31 * @package Extbase
32 * @version $ID:$
33 * @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
34 * @see Tx_Extbase_Bootstrap, Tx_Extbase_MVC_Dispatcher
35 */
36 class Tx_Extbase_Dispatcher {
37
38 /**
39 * @var Tx_Extbase_Configuration_ConfigurationManagerInterface
40 */
41 protected static $configurationManager;
42
43 /**
44 * @var Tx_Extbase_Persistence_Manager
45 */
46 protected static $persistenceManager;
47
48 /**
49 * Injects the Configuration Manager
50 *
51 * @param Tx_Extbase_Configuration_ConfigurationManagerInterface An instance of the Configuration Manager
52 * @return void
53 */
54 public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) {
55 self::$configurationManager = $configurationManager;
56 }
57
58 /**
59 * Injects the Persistence Manager
60 *
61 * @param Tx_Extbase_Persistence_Manager An instance of the Persistence Manager
62 * @return void
63 */
64 public function injectPersistenceManager(Tx_Extbase_Persistence_Manager $persistenceManager) {
65 self::$persistenceManager = $persistenceManager;
66 }
67
68 /**
69 * Returns the Configuration Manager.
70 *
71 * @return Tx_Extbase_Configuration_Manager An instance of the Configuration Manager
72 * @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
73 */
74 public static function getConfigurationManager() {
75 t3lib_div::logDeprecatedFunction();
76 return self::$configurationManager;
77 }
78
79 /**
80 * Returns the Persistance Manager
81 *
82 * @return Tx_Extbase_Persistence_Manager An instance of the Persistence Manager
83 * @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
84 */
85 public static function getPersistenceManager() {
86 t3lib_div::logDeprecatedFunction();
87 return self::$persistenceManager;
88 }
89
90 /**
91 * Returns the settings of Extbase
92 *
93 * @return array The configuration for the Extbase framework
94 * @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
95 */
96 public static function getExtbaseFrameworkConfiguration() {
97 t3lib_div::logDeprecatedFunction();
98 return self::$configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
99 }
100
101 }
102 ?>