Login   Register  
PHP Classes
elePHPant
Icontem

DConnect

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      DConnect  >  All threads  >  DConnect  >  (Un) Subscribe thread alerts  
Subject:DConnect
Summary:DConnect functionality
Messages:1
Author:João Mário Nedeff
Date:2012-11-26 12:41:39
 

  1. DConnect   Reply  
Picture of João Mário Nedeff
João Mário Nedeff
2012-11-26 12:41:39
This class implements a standard way to connect to a database.

Its objective is to get the project organized, providing an easy method to retrieve a connection to the database.

<strong>$conn = DBConnect::Connect(); // Thats it - you have your connection!</strong>

It relies on the Configs class. This one, reads information from the <strong>core.ini</strong> file, which is placed in the <strong>/project/configs</strong> folder.

So, if you have many projects, it really is a relief to automatically know where are the connections paramenters.

Once they are set on the INI file, you never have to worry about them again. Through a single call for a <strong>static method</strong> you get your connection!