[FEATURE] Allow overwriting of Bootstrap with DI
authorFelix Oertel <f@oer.tel>
Mon, 30 Apr 2012 21:22:14 +0000 (23:22 +0200)
committerMarc Bastian Heinrichs <typo3@mbh-software.de>
Mon, 30 Apr 2012 21:22:14 +0000 (23:22 +0200)
An interface is needed for the Bootstrap, which will be
used with the objectManager to make the Bootstrap
overwritable.

Resolves: #35960
Change-Id: I5cfd9ba9f00f206db46fad06e4302d808b6e1962

typo3/sysext/extbase/Classes/Core/Bootstrap.php
typo3/sysext/extbase/Classes/Core/BootstrapInterface.php [new file with mode: 0644]
typo3/sysext/extbase/ext_tables.php

index ab6e185..c12b8c4 100644 (file)
@@ -31,7 +31,7 @@
  * @package Extbase
  * @version $ID:$
  */
-class Tx_Extbase_Core_Bootstrap {
+class Tx_Extbase_Core_Bootstrap implements Tx_Extbase_Core_BootstrapInterface {
 
        /**
         * Back reference to the parent content object
@@ -295,4 +295,4 @@ class Tx_Extbase_Core_Bootstrap {
        }
 
 }
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/extbase/Classes/Core/BootstrapInterface.php b/typo3/sysext/extbase/Classes/Core/BootstrapInterface.php
new file mode 100644 (file)
index 0000000..8512999
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/*                                                                        *
+ * This script belongs to the Extbase framework.                          *
+ *                                                                        *
+ * This class is a backport of the corresponding class of FLOW3.          *
+ * All credits go to the v5 team.                                         *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License, either version 3   *
+ * of the License, or (at your option) any later version.                 *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * Bootstrap Interface
+ *
+ * @package Extbase
+ */
+interface Tx_Extbase_Core_BootstrapInterface {
+
+       /**
+        * Runs the the Extbase Framework by resolving an appropriate Request Handler and passing control to it.
+        * If the Framework is not initialized yet, it will be initialized.
+        *
+        * @param string $content The content. Not used
+        * @param array $configuration The TS configuration array
+        * @return string $content The processed content
+        * @api
+        */
+       public function run($content, $configuration);
+
+        /**
+         * This method forwards the call to run(). This method is invoked by the mod.php
+         * function of TYPO3.
+         *
+         * @param string $moduleSignature
+         * @return boolean TRUE, if the request request could be dispatched
+         * @see run()
+         **/
+       public function callModule($moduleSignature);
+}
+?>
\ No newline at end of file
index 9297d01..5a5321e 100644 (file)
@@ -3,7 +3,7 @@ if (!defined ('TYPO3_MODE')) die ('Access denied.');
 
 if (TYPO3_MODE == 'BE') {
        // register Extbase dispatcher for modules
-       $TBE_MODULES['_dispatcher'][] = 'Tx_Extbase_Core_Bootstrap';
+       $TBE_MODULES['_dispatcher'][] = 'Tx_Extbase_Core_BootstrapInterface';
 }
 
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['extbase'][] = 'tx_extbase_utility_extbaserequirementscheck';