‪TYPO3CMS  11.5
TYPO3\CMS\Extbase\Core\Bootstrap Class Reference

Public Member Functions

 __construct (ContainerInterface $container, ConfigurationManagerInterface $configurationManager, PersistenceManagerInterface $persistenceManager, RequestHandlerResolver $requestHandlerResolver, CacheService $cacheService, Dispatcher $dispatcher, RequestBuilder $extbaseRequestBuilder)
 
 setContentObjectRenderer (ContentObjectRenderer $cObj)
 
 initialize (array $configuration)
 
 initializeConfiguration (array $configuration)
 
string run (string $content, array $configuration, ?ServerRequestInterface $request=null)
 
ResponseInterface handleBackendRequest (ServerRequestInterface $request)
 

Static Public Attributes

static array $persistenceClasses = array( )
 

Protected Member Functions

 handleFrontendRequest (ServerRequestInterface $request)
 
 clearCacheOnError ()
 
 resetSingletons ()
 
 isExtbaseRequestCacheable (RequestInterface $extbaseRequest)
 

Protected Attributes

ContentObjectRenderer $cObj = null
 
ContainerInterface $container
 
ConfigurationManagerInterface $configurationManager
 
PersistenceManagerInterface $persistenceManager
 
RequestHandlerResolver $requestHandlerResolver
 
CacheService $cacheService
 
Dispatcher $dispatcher
 
RequestBuilder $extbaseRequestBuilder
 

Detailed Description

Creates a request and dispatches it to the controller which was specified by TS Setup, flexForm and returns the content.

This class is the main entry point for extbase extensions.

Definition at line 41 of file Bootstrap.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ clearCacheOnError()

TYPO3\CMS\Extbase\Core\Bootstrap::clearCacheOnError ( )
protected

Clear cache of current page on error. Needed because we want a re-evaluation of the data.

Definition at line 239 of file Bootstrap.php.

References $GLOBALS, and TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK.

Referenced by TYPO3\CMS\Extbase\Core\Bootstrap\handleFrontendRequest().

◆ handleBackendRequest()

ResponseInterface TYPO3\CMS\Extbase\Core\Bootstrap::handleBackendRequest ( ServerRequestInterface  $request)

Entrypoint for backend modules, handling PSR-7 requests/responses.

Creates an Extbase Request, dispatches it and then returns the Response

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface

Definition at line 217 of file Bootstrap.php.

References TYPO3\CMS\Extbase\Core\Bootstrap\initialize(), and TYPO3\CMS\Extbase\Core\Bootstrap\resetSingletons().

◆ handleFrontendRequest()

TYPO3\CMS\Extbase\Core\Bootstrap::handleFrontendRequest ( ServerRequestInterface  $request)
protected

◆ initialize()

TYPO3\CMS\Extbase\Core\Bootstrap::initialize ( array  $configuration)

Explicitly initializes all necessary Extbase objects by invoking the various initialize* methods.

Usually this method is only called from unit tests or other applications which need a more fine grained control over the initialization and request handling process. Most other applications just call the run() method.

Parameters
array$configuration‪The TS configuration array
Exceptions

Definition at line 100 of file Bootstrap.php.

References TYPO3\CMS\Extbase\Core\Bootstrap\initializeConfiguration(), and TYPO3\CMS\Core\Core\Environment\isCli().

Referenced by TYPO3\CMS\Extbase\Core\Bootstrap\handleBackendRequest(), and TYPO3\CMS\Extbase\Core\Bootstrap\run().

◆ initializeConfiguration()

TYPO3\CMS\Extbase\Core\Bootstrap::initializeConfiguration ( array  $configuration)

Initializes the Object framework.

Parameters
array$configuration
See also
initialize()

Definition at line 120 of file Bootstrap.php.

Referenced by TYPO3\CMS\Extbase\Core\Bootstrap\initialize().

◆ isExtbaseRequestCacheable()

◆ resetSingletons()

TYPO3\CMS\Extbase\Core\Bootstrap::resetSingletons ( )
protected

Resets global singletons for the next plugin

Definition at line 252 of file Bootstrap.php.

Referenced by TYPO3\CMS\Extbase\Core\Bootstrap\handleBackendRequest(), and TYPO3\CMS\Extbase\Core\Bootstrap\handleFrontendRequest().

◆ run()

string TYPO3\CMS\Extbase\Core\Bootstrap::run ( string  $content,
array  $configuration,
?ServerRequestInterface  $request = null 
)

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.

This is usually used in Frontend plugins.

Parameters
string$content‪The content. Not used
array$configuration‪The TS configuration array
Returns
‪string $content The processed content

Definition at line 143 of file Bootstrap.php.

References $GLOBALS, TYPO3\CMS\Extbase\Core\Bootstrap\handleFrontendRequest(), and TYPO3\CMS\Extbase\Core\Bootstrap\initialize().

◆ setContentObjectRenderer()

TYPO3\CMS\Extbase\Core\Bootstrap::setContentObjectRenderer ( ContentObjectRenderer  $cObj)

Called for frontend plugins from UserContentObject via ContentObjectRenderer->callUserFunction().

Parameters
ContentObjectRenderer$cObj

Definition at line 85 of file Bootstrap.php.

References TYPO3\CMS\Extbase\Core\Bootstrap\$cObj.

Member Data Documentation

◆ $cacheService

CacheService TYPO3\CMS\Extbase\Core\Bootstrap::$cacheService
protected

Definition at line 58 of file Bootstrap.php.

Referenced by TYPO3\CMS\Extbase\Core\Bootstrap\__construct().

◆ $cObj

ContentObjectRenderer TYPO3\CMS\Extbase\Core\Bootstrap::$cObj = null
protected

◆ $configurationManager

ConfigurationManagerInterface TYPO3\CMS\Extbase\Core\Bootstrap::$configurationManager
protected

Definition at line 55 of file Bootstrap.php.

Referenced by TYPO3\CMS\Extbase\Core\Bootstrap\__construct().

◆ $container

ContainerInterface TYPO3\CMS\Extbase\Core\Bootstrap::$container
protected

Definition at line 54 of file Bootstrap.php.

Referenced by TYPO3\CMS\Extbase\Core\Bootstrap\__construct().

◆ $dispatcher

Dispatcher TYPO3\CMS\Extbase\Core\Bootstrap::$dispatcher
protected

Definition at line 59 of file Bootstrap.php.

Referenced by TYPO3\CMS\Extbase\Core\Bootstrap\__construct().

◆ $extbaseRequestBuilder

RequestBuilder TYPO3\CMS\Extbase\Core\Bootstrap::$extbaseRequestBuilder
protected

Definition at line 60 of file Bootstrap.php.

Referenced by TYPO3\CMS\Extbase\Core\Bootstrap\__construct().

◆ $persistenceClasses

array TYPO3\CMS\Extbase\Core\Bootstrap::$persistenceClasses = array( )
static

Definition at line 45 of file Bootstrap.php.

◆ $persistenceManager

PersistenceManagerInterface TYPO3\CMS\Extbase\Core\Bootstrap::$persistenceManager
protected

Definition at line 56 of file Bootstrap.php.

Referenced by TYPO3\CMS\Extbase\Core\Bootstrap\__construct().

◆ $requestHandlerResolver

RequestHandlerResolver TYPO3\CMS\Extbase\Core\Bootstrap::$requestHandlerResolver
protected

Definition at line 57 of file Bootstrap.php.

Referenced by TYPO3\CMS\Extbase\Core\Bootstrap\__construct().