Login   Register  
PHP Classes
elePHPant
Icontem

For me it is not useful because I do not have the global $ da...

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

      Simple PDO wrapper  >  All threads  >  For me it is not useful because I do not have the global $ da...  >  (Un) Subscribe thread alerts  
Subject:For me it is not useful because I do not have the global $ da...
Summary:Package rating comment
Messages:3
Author:Maykonn Welington Candido
Date:2013-10-27 15:54:35
Update:2013-11-06 23:58:49
 

Maykonn Welington Candido rated this package as follows:

Utility: Not sure
Consistency: Sufficient

  1. For me it is not useful because I do not have the global $ da...   Reply   Report abuse  
Picture of Maykonn Welington Candido
Maykonn Welington Candido
2013-10-27 15:54:36
For me it is not useful because I do not have the global $ database and $ conf.

What are $ database and $ conf? These variables will probably not exist in the client applications. therefore:

Do not make use of global ($database and $conn). Use the constructor to inject these properties in the class.

public function __construct(Array $database, Array $conf) {
$this->database = $database;
$this->conf = $conf;
}

  2. Re: For me it is not useful because I do not have the global $ d   Reply   Report abuse  
Picture of Jan Altensen
Jan Altensen
2013-11-06 18:17:11 - In reply to message 1 from Maykonn Welington Candido
thank you for this post

i fix it later

  3. Re: For me it is not useful because I do not have the global $ d   Reply   Report abuse  
Picture of Jan Altensen
Jan Altensen
2013-11-06 23:58:49 - In reply to message 1 from Maykonn Welington Candido
ok now fixed