Accessing Mysqli From Different Class
View Single Post
08-23-2009, 07:27 PM
Join Date: Jun 2008
Only extend classes which will be children of that database object, for instance an SQL-Writer ( Part of an ActiveRecord, ORM Object ) would be a logical extension of a DAL object ( Though the argument could be made that the DAL object should just be fed into the SQL Writer but I digress ).
In this instance the issue seems to be that the object isn't being created in your getInstance() method. Also, I don't see the static instance property in your class.
Hello-world, extending the database class would bear no fruit in this case because the __construct method creates the database connection and it is private ( I'm under the assumption that he would like to keep the current structure )
View Public Profile
Send a private message to Enfernikus
Find More Posts by Enfernikus