I have 2 Special Pages on my wiki:
SpecialOne.php
SpecialTwo.php
In the main function of my first page (wfSpecialOne()
) i want to use functions from my 2nd Specialpage (X(), Y())
. But debugger says the method is unknown.
The same issue when the (now) static function X()
calls function A()
which is part of SpecialTwo.php
What i did so far:
include_once("SpecialTwo.php");
class SpecialOne extends SpecialPage {
public function __construct() {
parent::__construct( 'One' );
}
public function execute( $sub ) {
$out = $this->getOutput();
$this->wfSpecialOne();
}
function wfSpeicalOne(){
$var1 = X();
$var2 = Y();
}
}
My first thought was to make all the functions static
. But if so I'd have to refactor the function calls in each class to:
SpecialTwo::X();
SpecialTwo::Y():
Isn't there a better way? or did i miss something?