Code:
require_once 'SystemComponent.php';
class DbConnector extends SystemComponent {
var $theQuery;
var $link;
//*** Function: DbConnector, Purpose: Connect to the database ***
function DbConnector(){
// Load settings from parent class
$settings = SystemComponent::getSettings();
First question: why do we need "require_once 'SystemComponent.php';" when this class is already an extension of the parent class SystemComponent.php.
Second question: Why do we need to load settings from the parent class, when its already extended. Are the variables not already accessible in the base class.
require_once 'SystemComponent.php';
class DbConnector extends SystemComponent {
var $theQuery;
var $link;
//*** Function: DbConnector, Purpose: Connect to the database ***
function DbConnector(){
// Load settings from parent class
$settings = SystemComponent::getSettings();
First question: why do we need "require_once 'SystemComponent.php';" when this class is already an extension of the parent class SystemComponent.php.
Second question: Why do we need to load settings from the parent class, when its already extended. Are the variables not already accessible in the base class.