Login   Register  
PHP Classes
elePHPant
Icontem

What is a class

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

      DConnect  >  All threads  >  What is a class  >  (Un) Subscribe thread alerts  
Subject:What is a class
Summary:Before you publish, look around
Messages:2
Author:Kees de Haan
Date:2012-11-25 07:47:59
Update:2012-11-26 13:00:56
 

  1. What is a class   Reply   Report abuse  
Picture of Kees de Haan
Kees de Haan
2012-11-25 07:48:00
This is what I would call a PDO-class: http://code.google.com/p/php-pdo-wrapper-class/

  2. Re: What is a class   Reply   Report abuse  
Picture of João Mário Nedeff
João Mário Nedeff
2012-11-26 13:00:56 - In reply to message 1 from Kees de Haan
The idea with this class is to have a standard and easy way to retrieve the connection info and return your PDO object.

$conn = DConnect::Connect()

I already uploaded another class that use this one to retrieve the connection and have similar functionality to the one you posted here, managing SQL.

This class works OO way, helping to get the code organized. It will be available soon, just awaiting approval. Please come back later to check it out.

Maybe OO serves this proposit, to get the code organized and therefore it's a good thing to make each class specialized at its very purpose.

Sometimes, the purpose of the class is so simple that you end up with a very simple class.

But yet, the benefit from DConnect class is to facilitate the retrieval of the connection, always the same and easy way. This task than, gets out of the way and one can put his mind to deal with more important things!