protected function getControllerInstance()
    {
        // One-time instantiation of an extended controller object
        if ($this->controllerInstance === null) {
            $extendedControllerClassName = $this->extbaseController.'ComponentController_'.md5(
                    $this->extbaseControllerClass
                );

            // One-off class declaration
            if (!class_exists($extendedControllerClassName, false)) {
                $extendedControllerPhp = 'class '.$extendedControllerClassName.' extends '.$this->extbaseControllerClass;
                $extendedControllerPhp .= ' implements '.ComponentControllerInterface::class;
                $extendedControllerPhp .= ' { use '.ComponentControllerTrait::class.'; }';
                eval($extendedControllerPhp);
            }

            $this->controllerInstance = $this->objectManager->get($extendedControllerClassName);
        }

        $settings = $this->controllerSettings ?: [];

        return $this->controllerInstance->setSettings($settings);
    }