changed direct public access of maniacontrol properties to using getter methods

This commit is contained in:
Steffen Schröder
2014-08-03 01:34:18 +02:00
parent e560919096
commit 4d3dc92ad5
64 changed files with 2337 additions and 2055 deletions

View File

@ -39,7 +39,9 @@ class BillManager implements CallbackListener {
*/
public function __construct(ManiaControl $maniaControl) {
$this->maniaControl = $maniaControl;
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_BILLUPDATED, $this, 'handleBillUpdated');
// Callbacks
$this->maniaControl->getCallbackManager()->registerCallbackListener(CallbackManager::CB_MP_BILLUPDATED, $this, 'handleBillUpdated');
}
/**
@ -57,7 +59,7 @@ class BillManager implements CallbackListener {
trigger_error("Function is not callable!");
return false;
}
$bill = $this->maniaControl->client->sendBill($player->login, $amount, $message, $receiver);
$bill = $this->maniaControl->getClient()->sendBill($player->login, $amount, $message, $receiver);
$this->openBills[$bill] = new BillData($function, $player, $amount);
return true;
}
@ -72,7 +74,7 @@ class BillManager implements CallbackListener {
* @return bool
*/
public function sendPlanets(callable $function, $receiverLogin, $amount, $message) {
$bill = $this->maniaControl->client->pay($receiverLogin, $amount, $message);
$bill = $this->maniaControl->getClient()->pay($receiverLogin, $amount, $message);
$this->openBills[$bill] = new BillData($function, $receiverLogin, $amount, true);
return true;
}