[TYPO3-mvc] Signal/Slot pattern

Tim Schoch | GSTALTIG tim.schoch at gstaltig.ch
Thu Dec 22 11:34:54 CET 2011


Sry, didn't read the thread from the beginning.
When extbase starts your extension (bootstrap->run), it first initializes the object manager

    protected function initializeObjectManager() {
        $this->objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
    }

and then configures it

    public function configureObjectManager() {
        $typoScriptSetup = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
        if (!is_array($typoScriptSetup['config.']['tx_extbase.']['objects.'])) {
            return;
        }
        $objectContainer = t3lib_div::makeInstance('Tx_Extbase_Object_Container_Container');
        foreach ($typoScriptSetup['config.']['tx_extbase.']['objects.'] as $classNameWithDot => $classConfiguration) {
            if (isset($classConfiguration['className'])) {
                $originalClassName = rtrim($classNameWithDot, '.');
                $objectContainer->registerImplementation($originalClassName, $classConfiguration['className']);
            }
        }
    }

Even if extbase is way above your code in the localconf file, it won't initialized at the time your stuff gets executed.
(Id say the first time the initialization is run would be during page rendering - just guessing here) This is my conclusion just from thinking about how TYPO3 itself works. I have not debugged this or anything - so I could be completely off.

Tim


More information about the TYPO3-project-typo3v4mvc mailing list