TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect Class Reference
Inheritance diagram for TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect:
TYPO3\CMS\Install\Controller\Action\Step\AbstractStepAction TYPO3\CMS\Install\Controller\Action\AbstractAction TYPO3\CMS\Install\Controller\Action\Step\StepInterface TYPO3\CMS\Install\Controller\Action\ActionInterface

Public Member Functions

 needsExecution ()
 
- Public Member Functions inherited from TYPO3\CMS\Install\Controller\Action\Step\AbstractStepAction
 setStepsCounter ($current, $total)
 
 getCurrentStep ()
 
 getTotalSteps ()
 
- Public Member Functions inherited from TYPO3\CMS\Install\Controller\Action\AbstractAction
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManager $objectManager)
 
 injectView (\TYPO3\CMS\Install\View\FailsafeView $view)
 
 handle ()
 
 setToken ($token)
 
 setController ($controller)
 
 setAction ($action)
 
 setPostValues (array $postValues)
 
 setLastError (array $lastError)
 
 setMessages (array $messages=[])
 
- Public Member Functions inherited from TYPO3\CMS\Install\Controller\Action\Step\StepInterface
 execute ()
 

Protected Member Functions

 executeAction ()
 
 getConfiguredOrDefaultPort ()
 
 isHostConfigured ()
 
 isConfigurationComplete ()
 
 isConnectionWithUnixDomainSocketPossible ()
 
 setDbalInputFieldsToRender ()
 
 getAvailableDbalDrivers ()
 
 getSupportedDbalDrivers ()
 
 getSelectedDbalDriver ()
 
 getConfiguredUsername ()
 
 getConfiguredPassword ()
 
 getConfiguredHost ()
 
 getConfiguredPort ()
 
 getConfiguredSocket ()
 
- Protected Member Functions inherited from TYPO3\CMS\Install\Controller\Action\Step\AbstractStepAction
 assignSteps ()
 
- Protected Member Functions inherited from TYPO3\CMS\Install\Controller\Action\AbstractAction
 initializeHandle ()
 
 executeAction ()
 
 isDbalEnabled ()
 
 getContext ()
 
 loadExtLocalconfDatabaseAndExtTables ()
 
 getHashedPassword ($password)
 

Additional Inherited Members

- Protected Attributes inherited from TYPO3\CMS\Install\Controller\Action\Step\AbstractStepAction
 $currentStep = 0
 
 $totalSteps = 0
 
- Protected Attributes inherited from TYPO3\CMS\Install\Controller\Action\AbstractAction
 $objectManager = null
 
 $view = null
 
 $controller = ''
 
 $action = ''
 
 $token = ''
 
 $postValues = []
 
 $lastError = []
 
 $messages = []
 

Detailed Description

Database connect step:

  • Needs execution if database credentials are not set or fail to connect
  • Renders fields for database connection fields
  • Sets database credentials in LocalConfiguration
  • Loads / unloads ext:dbal and ext:adodb if requested

Definition at line 26 of file DatabaseConnect.php.

Member Function Documentation

◆ executeAction()

◆ getAvailableDbalDrivers()

TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect::getAvailableDbalDrivers ( )
protected

◆ getConfiguredHost()

TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect::getConfiguredHost ( )
protected

◆ getConfiguredOrDefaultPort()

◆ getConfiguredPassword()

TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect::getConfiguredPassword ( )
protected

◆ getConfiguredPort()

TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect::getConfiguredPort ( )
protected

Returns configured port. Gets port from host value if port is not yet set.

Returns
int

Definition at line 642 of file DatabaseConnect.php.

References $GLOBALS, and $host.

Referenced by TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect\getConfiguredOrDefaultPort(), and TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect\isConfigurationComplete().

◆ getConfiguredSocket()

TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect::getConfiguredSocket ( )
protected

◆ getConfiguredUsername()

TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect::getConfiguredUsername ( )
protected

◆ getSelectedDbalDriver()

◆ getSupportedDbalDrivers()

TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect::getSupportedDbalDrivers ( )
protected

Returns a list of DBAL supported database drivers, with a user-friendly name and any PHP module dependency.

Returns
array

Definition at line 521 of file DatabaseConnect.php.

Referenced by TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect\getAvailableDbalDrivers().

◆ isConfigurationComplete()

◆ isConnectionWithUnixDomainSocketPossible()

TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect::isConnectionWithUnixDomainSocketPossible ( )
protected

Test if a unix domain socket can be opened. This does not authenticate but only tests if a connect is successful.

Returns
bool TRUE on success

Definition at line 412 of file DatabaseConnect.php.

References TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect\getConfiguredSocket().

Referenced by TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect\isConfigurationComplete().

◆ isHostConfigured()

TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect::isHostConfigured ( )
protected

Check LocalConfiguration.php for required database settings:

  • 'host' is mandatory and must not be empty
  • 'port' OR 'socket' is mandatory, but may be empty
Returns
bool TRUE if host is set

Definition at line 317 of file DatabaseConnect.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect\isConfigurationComplete(), and TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect\needsExecution().

◆ needsExecution()

TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect::needsExecution ( )

◆ setDbalInputFieldsToRender()

TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect::setDbalInputFieldsToRender ( )
protected

Render fields required for successful connect based on dbal driver selection. Hint: There is a code duplication in handle() and this method. This is done by intention to keep this code area easy to maintain and understand.

Returns
void

Definition at line 441 of file DatabaseConnect.php.

References $driver, $GLOBALS, and TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect\getSelectedDbalDriver().

Referenced by TYPO3\CMS\Install\Controller\Action\Step\DatabaseConnect\executeAction().