Hi all,
I have a class and a function outside this class. How can I use this function as a method of the class without rewriting the same code?
Eg:
function Foo($a) {
echo $a;
}
class Bar {
//define here that (maybe an instance of) Foo() is a method of Bar, without rewriting the hole function
}
I need this behaviour because I want to use the function outside the object too.