I have a class "A" containing a static method. Now I want a copy of that class(whether by extension or not) except I need that static method to become non-static in the new class.
Any ideas are welcome. Thanks in advance.
I tried extending but when redeclaring the method as non-static I got an error:
class A {
protected $key = null;
static function methodX($args) {
// ...
}
}
class B extends A {
protected $key = "key";
public function methodX($args) {
// ...
return $this->key;
}
}