I'm trying to retrieve a variable from an extended class. This is how my main class looks:
class SS {
public $NONE = NULL;
public $NUMBERS = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
public $OPERATORS = array("=", "&&", ">", "<", "+", "-", "/", "*", "^");
public $DBLQUOTES = '"$1"';
public $SNGQUOTES = "'$1'";
public $CODE;
function SuperSyn($sCode, $cLang) {
$hLang = new VB6;
$VB6 = $hLang->__construct();
echo $VB6->ssAuthor;
}
}
And my extended class looks like this (I've removed many of the keywords).
class VB6 extends SS {
public function __construct() {
$ssAuthor = "James Brooks";
$ssCSS = "languages/vb6.css";
$ssNumbers = $NUMBERS;
$ssKeywords = array("Abs", "Access", "AddItem");
$ssReserved = $NONE;
$ssComments = "('.+)";
$ssOperators = $OPERATORS;
$ssDoubleQuote = $NONE;
$ssSingleQuote = $NONE;
}
}
If I remove the public function __construct being called, PHP bitches that it's expecting a function.
My question is, how can I retrieve a variable from the extended class into my main class?