For instance I have the following class
class myClassName{
function funtionOne(){
$a = '123';
$b = '456';
$c = '789';
$d = 'var_value';
$e = 'var_value';
$f = 'var_value';
}
function funtionTwo(){
$a = '123';
$b = '456';
$c = '789';
$g = 'var_value';
$h = 'var_value';
$i = 'var_value';
}
}
As you can see the variables $a, $b, $c are in both methods. My question is: How can I extend a method so get something like this:
class myClassName{
function funtionABC(){
$a = '123';
$b = '456';
$c = '789';
}
function funtionOne(){
include functionABC's content here
$d = 'var_value';
$e = 'var_value';
$f = 'var_value';
}
function funtionOne(){
include functionABC's content here
$g = 'var_value';
$h = 'var_value';
$i = 'var_value';
}
}
Note: I do not want to return anything from the function, just want to retrieve the content, as you would with an include() or a trait. Thank you.