TrackManiaControl/libs/Maniaplanet/DedicatedServer/Structures/Vote.php

46 lines
850 B
PHP
Raw Normal View History

2014-01-16 16:56:24 +01:00
<?php
/**
* ManiaPlanet dedicated server Xml-RPC client
*
* @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
*/
2014-05-08 19:38:15 +02:00
2014-01-16 16:56:24 +01:00
namespace Maniaplanet\DedicatedServer\Structures;
class Vote extends AbstractStructure
{
const STATE_NEW = 'NewVote';
const STATE_CANCELLED = 'VoteCancelled';
const STATE_PASSED = 'VotePassed';
const STATE_FAILED = 'VoteFailed';
2014-05-08 19:38:15 +02:00
/** @var string */
2014-01-16 16:56:24 +01:00
public $status;
2014-05-08 19:38:15 +02:00
/** @var string */
2014-01-16 16:56:24 +01:00
public $callerLogin;
2014-05-08 19:38:15 +02:00
/** @var string */
2014-01-16 16:56:24 +01:00
public $cmdName;
2014-05-08 19:38:15 +02:00
/** @var mixed[] */
2014-01-16 16:56:24 +01:00
public $cmdParam;
2014-05-08 19:38:15 +02:00
/**
* @param string $cmdName
* @param mixed[] $cmdParam
*/
2024-08-25 22:30:06 +02:00
function __construct($cmdName = '', $cmdParam = [])
2014-05-08 19:38:15 +02:00
{
$this->cmdName = $cmdName;
$this->cmdParam = $cmdParam;
}
/**
2014-05-20 15:20:16 +02:00
* @internal
2014-05-08 19:38:15 +02:00
* @return bool
*/
function isValid()
{
return is_string($this->cmdName)
&& is_array($this->cmdParam);
}
2014-01-16 16:56:24 +01:00
}