PHP Class AppserverIo\Appserver\Doctrine\Utils\ConnectionUtil

Show file Open project: appserver-io/appserver Class Usage Examples

Protected Properties

Property Type Description
$application AppserverIo\Psr\Application\ApplicationInterface The application instance.

Public Methods

Method Description
fromDatabaseNode ( AppserverIo\Appserver\Core\Api\Node\DatabaseNodeInterface $databaseNode ) : array Creates an array with the connection parameters for a Doctrine DBAL connection from the passed database node.
get ( AppserverIo\Psr\Application\ApplicationInterface $application ) : AppserverIo\Appserver\Doctrine\Utils\DoctrineHelper Creates a new helper instance.
getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface Returns the application instance.

Private Methods

Method Description
__clone ( ) : void This is a utility class, so protect it against cloning.
__construct ( AppserverIo\Psr\Application\ApplicationInterface $application ) This is a utility class, so protect it against direct instantiation.

Method Details

fromDatabaseNode() public method

Creates an array with the connection parameters for a Doctrine DBAL connection from the passed database node.
public fromDatabaseNode ( AppserverIo\Appserver\Core\Api\Node\DatabaseNodeInterface $databaseNode ) : array
$databaseNode AppserverIo\Appserver\Core\Api\Node\DatabaseNodeInterface The database node to create the connection parameters from
return array The DBAL connection parameters

get() public static method

Creates a new helper instance.
public static get ( AppserverIo\Psr\Application\ApplicationInterface $application ) : AppserverIo\Appserver\Doctrine\Utils\DoctrineHelper
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
return AppserverIo\Appserver\Doctrine\Utils\DoctrineHelper The instance

getApplication() public method

Returns the application instance.
public getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface
return AppserverIo\Psr\Application\ApplicationInterface The application instance

Property Details

$application protected property

The application instance.
protected ApplicationInterface,AppserverIo\Psr\Application $application
return AppserverIo\Psr\Application\ApplicationInterface