04-26-2008, 11:00 AM
|
#2 (permalink)
|
|
The Acquainted
Join Date: Feb 2008
Posts: 119
Thanks: 17
|
you should have a property in your security class that would be an instance of database class:
PHP Code:
class Security { private $db;
public function __construct() { $this->db = new Database(); }
public function blabla { $this->db->query().... } }
Also it would be better to have a method like getDb() that will return the database object in stead of accessing to the variable directly.
|
|
|
|