Extension of PEAR classes.
Posted: Thu Jun 13, 2013 6:00 am
Hello,
I am trying to extend a class from the package Math_Finace in PEAR.
As a trial the only thing I am doing is to write the extended class like this:
class Math_Finance_Inher extends Math_Finance {
function newPresentValue() {
return "A string";
}
}
in a separate file under the file where is the base class.
Afterwards, I create a object:
$var = new Math_Finance_Inher();
and I tried to get the value of newPresentValue();
echo $var -> newPresentValue();
but nothing is returned, though there are not errors either.
Am I missing something?
Thank you.
I am trying to extend a class from the package Math_Finace in PEAR.
As a trial the only thing I am doing is to write the extended class like this:
class Math_Finance_Inher extends Math_Finance {
function newPresentValue() {
return "A string";
}
}
in a separate file under the file where is the base class.
Afterwards, I create a object:
$var = new Math_Finance_Inher();
and I tried to get the value of newPresentValue();
echo $var -> newPresentValue();
but nothing is returned, though there are not errors either.
Am I missing something?
Thank you.