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

46 lines
851 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
*/
function __construct($cmdName='', $cmdParam=array())
{
$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
}