TrackManiaControl/core/Bills/BillData.php

49 lines
1.3 KiB
PHP
Raw Normal View History

2014-02-25 18:34:35 +01:00
<?php
namespace ManiaControl\Bills;
2014-05-02 17:40: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 {
/*
* Public properties
*/
2015-06-03 22:49:08 +02:00
public $function = null;
public $pay = false;
public $player = null;
public $receiverLogin = null;
2015-06-03 22:49:08 +02:00
public $amount = 0;
public $creationTime = -1;
public $message = "";
2015-07-10 22:56:27 +02:00
public $class = "";
2014-02-25 18:34:35 +01:00
/**
* Construct new Bill Data Model
2014-05-02 17:40:47 +02:00
*
2015-07-10 22:56:27 +02:00
* @param string $class
2014-08-03 13:30:07 +02:00
* @param callable $function
* @param Player|string $player
* @param int $amount
* @param bool $pay
* @param string $receiverLogin
2015-06-03 22:49:08 +02:00
* @param string $message
*/
2015-07-10 22:56:27 +02:00
public function __construct($class, callable $function, $player, $amount, $pay = false, $receiverLogin = null, $message = '') {
$this->class = $class;
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();
}
}