com\setasign\Konquadrat\Config\Builder

DatabaseBuilder Describes a logger-aware instance.

File: /Konquadrat/src/Config/Builder/DatabaseBuilder.php

Class hierarchy

Implements

  • \Psr\Log\LoggerAwareInterface

Summary

Properties

$db

protected \com\setasign\SetaFramework\Database\Database DatabaseBuilder::$db

$logger

protected ?\Psr\Log\LoggerInterface DatabaseBuilder::$logger

$manager

protected \com\setasign\SetaFramework\Database\Manager\AbstractManager DatabaseBuilder::$manager

$tableSchemaBuilder

protected \com\setasign\SetaFramework\Database\Manager\TableSchemaBuilder DatabaseBuilder::$tableSchemaBuilder

Methods

__construct()

public DatabaseBuilder::__construct (
\com\setasign\SetaFramework\Database\Database $db
)

DatabaseBuilder constructor.

Parameters
$db : \com\setasign\SetaFramework\Database\Database
 

build()

public DatabaseBuilder::build (
\com\setasign\SetaFramework\Config\Config $config
): void
Parameters
$config : \com\setasign\SetaFramework\Config\Config
 
Exceptions

Throws \Throwable

buildStructure()

public DatabaseBuilder::buildStructure (
\com\setasign\SetaFramework\Config\Config $config,
bool $withDefaultStructure = false
): void
Parameters
$config : \com\setasign\SetaFramework\Config\Config
 
$withDefaultStructure : bool
 
Exceptions

Throws \Throwable

checkData()

public DatabaseBuilder::checkData (
void
): void

Checks and repairs the consistency of related tables.

If an object type is extended with another template the table has to be filled with the IDs of the origin table to keep inner-joins working.

createDatabaseField()

protected DatabaseBuilder::createDatabaseField (
\com\setasign\SetaFramework\Config\Config $fieldConfig,
string $tableName
): ?\com\setasign\SetaFramework\Database\Manager\Column\AbstractColumn
Parameters
$fieldConfig : \com\setasign\SetaFramework\Config\Config
 
$tableName : string
 
Exceptions

Throws \com\setasign\Konquadrat\Exception

setLogger()

public DatabaseBuilder::setLogger (
\Psr\Log\LoggerInterface $logger
): void

Sets a logger instance on the object.

Parameters
$logger : \Psr\Log\LoggerInterface