2014-02-25 18:34:35 +01:00
|
|
|
<?php
|
2014-04-12 12:14:37 +02:00
|
|
|
|
|
|
|
namespace ManiaControl\Bills;
|
2014-05-02 17:40:47 +02:00
|
|
|
|
2014-07-25 16:28:47 +02:00
|
|
|
use ManiaControl\Players\Player;
|
|
|
|
|
2014-02-25 18:34:35 +01:00
|
|
|
/**
|
|
|
|
* ManiaControl BillData Structure
|
|
|
|
*
|
2014-05-02 17:40:47 +02:00
|
|
|
* @author ManiaControl Team <mail@maniacontrol.com>
|
2015-01-19 11:06:20 +01:00
|
|
|
* @copyright 2014-2015 ManiaControl Team
|
2014-05-02 17:40:47 +02:00
|
|
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
2014-02-25 18:34:35 +01:00
|
|
|
*/
|
|
|
|
class BillData {
|
2014-04-12 12:14:37 +02:00
|
|
|
/*
|
2014-07-25 16:28:47 +02:00
|
|
|
* Public properties
|
2014-04-12 12:14:37 +02:00
|
|
|
*/
|
2015-06-03 22:49:08 +02:00
|
|
|
public $function = null;
|
|
|
|
public $pay = false;
|
|
|
|
public $player = null;
|
2014-05-02 16:13:45 +02:00
|
|
|
public $receiverLogin = null;
|
2015-06-03 22:49:08 +02:00
|
|
|
public $amount = 0;
|
|
|
|
public $creationTime = -1;
|
|
|
|
public $message = "";
|
2014-02-25 18:34:35 +01:00
|
|
|
|
2014-04-12 12:14:37 +02:00
|
|
|
/**
|
2014-07-25 16:28:47 +02:00
|
|
|
* Construct new Bill Data Model
|
2014-05-02 17:40:47 +02:00
|
|
|
*
|
2014-08-03 13:30:07 +02:00
|
|
|
* @param callable $function
|
2014-07-25 16:28:47 +02:00
|
|
|
* @param Player|string $player
|
|
|
|
* @param int $amount
|
|
|
|
* @param bool $pay
|
|
|
|
* @param string $receiverLogin
|
2015-06-03 22:49:08 +02:00
|
|
|
* @param string $message
|
2014-04-12 12:14:37 +02:00
|
|
|
*/
|
2015-06-03 22:49:08 +02:00
|
|
|
public function __construct(callable $function, $player, $amount, $pay = false, $receiverLogin = null, $message = '') {
|
2014-02-25 18:34:35 +01:00
|
|
|
$this->function = $function;
|
|
|
|
$this->player = $player;
|
|
|
|
$this->amount = $amount;
|
|
|
|
$this->pay = $pay;
|
|
|
|
$this->receiverLogin = $receiverLogin;
|
2015-06-03 22:49:08 +02:00
|
|
|
$this->message = $message;
|
2014-02-25 18:34:35 +01:00
|
|
|
$this->creationTime = time();
|
|
|
|
}
|
2014-07-25 16:28:47 +02:00
|
|
|
}
|