API Documentação da API
Inscrições abertas para nosso Webinar anual Adianti Framework 2024!
Clique aqui para saber mais
Pacote Dominando o Adianti 7
Curso + Livro + Apps exemplo
Curso completo em Video Aulas (114 aulas).
Livro completo em PDF (463 páginas).
Códigos-fontes de Apps de exemplo.
API
API do Framework
Documentation

Documentation

TConnection
in package

Singleton manager for database connections

Tags
version
7.6
author

Pablo Dall'Oglio

copyright

Copyright (c) 2006 Adianti Solutions Ltd. (http://www.adianti.com.br)

license

https://adiantiframework.com.br/license

Table of Contents

Properties

$config_path  : mixed
$conn_cache  : mixed

Methods

getDatabaseInfo()  : mixed
Returns the database information as an array
open()  : A
Opens a database connection
openArray()  : A
Opens a database connection from array with db info
setConfigPath()  : mixed
Change database configuration Path
setDatabaseInfo()  : mixed
Set database info
__construct()  : mixed
Class Constructor There'll be no instances of this class

Properties

Methods

getDatabaseInfo()

Returns the database information as an array

public static getDatabaseInfo( $database) : mixed
Parameters
$database :

INI File

open()

Opens a database connection

public static open( $database) : A
Parameters
$database :

Name of the database (an INI file).

Tags
exception

Exception if the $database is not found

Return values
A

PDO object if the $database exist, otherwise, throws an exception

openArray()

Opens a database connection from array with db info

public static openArray( $db) : A
Parameters
$db :

Array with database info

Return values
A

PDO object

setConfigPath()

Change database configuration Path

public static setConfigPath( $path) : mixed
Parameters
$path :

Config path

setDatabaseInfo()

Set database info

public static setDatabaseInfo( $database,  $info) : mixed
Parameters
$database :

Database name

$info :

Database connection information

__construct()

Class Constructor There'll be no instances of this class

private __construct() : mixed

        
On this page

Search results