id
int32 0
241k
| repo
stringlengths 6
63
| path
stringlengths 5
140
| func_name
stringlengths 3
151
| original_string
stringlengths 84
13k
| language
stringclasses 1
value | code
stringlengths 84
13k
| code_tokens
list | docstring
stringlengths 3
47.2k
| docstring_tokens
list | sha
stringlengths 40
40
| url
stringlengths 91
247
|
|---|---|---|---|---|---|---|---|---|---|---|---|
234,300
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.execute
|
public function execute($methodName, $params = array(), $multicall = false)
{
if ($multicall) {
$this->xmlrpcClient->addCall($methodName, $params);
$this->multicallHandlers[] = $multicall;
} else {
return $this->xmlrpcClient->query($methodName, $params);
}
}
|
php
|
public function execute($methodName, $params = array(), $multicall = false)
{
if ($multicall) {
$this->xmlrpcClient->addCall($methodName, $params);
$this->multicallHandlers[] = $multicall;
} else {
return $this->xmlrpcClient->query($methodName, $params);
}
}
|
[
"public",
"function",
"execute",
"(",
"$",
"methodName",
",",
"$",
"params",
"=",
"array",
"(",
")",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"$",
"this",
"->",
"xmlrpcClient",
"->",
"addCall",
"(",
"$",
"methodName",
",",
"$",
"params",
")",
";",
"$",
"this",
"->",
"multicallHandlers",
"[",
"]",
"=",
"$",
"multicall",
";",
"}",
"else",
"{",
"return",
"$",
"this",
"->",
"xmlrpcClient",
"->",
"query",
"(",
"$",
"methodName",
",",
"$",
"params",
")",
";",
"}",
"}"
] |
Add a call in queue. It will be executed by the next Call from the user to executeMulticall
@param string $methodName
@param mixed[] $params
@param bool|callable $multicall True to queue the request or false to execute it immediately
@return mixed
|
[
"Add",
"a",
"call",
"in",
"queue",
".",
"It",
"will",
"be",
"executed",
"by",
"the",
"next",
"Call",
"from",
"the",
"user",
"to",
"executeMulticall"
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L102-L110
|
234,301
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setApiVersion
|
function setApiVersion($version, $multicall = false)
{
if (!is_string($version)) {
throw new InvalidArgumentException('version = ' . print_r($version, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($version), $multicall);
}
|
php
|
function setApiVersion($version, $multicall = false)
{
if (!is_string($version)) {
throw new InvalidArgumentException('version = ' . print_r($version, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($version), $multicall);
}
|
[
"function",
"setApiVersion",
"(",
"$",
"version",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"version",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'version = '",
".",
"print_r",
"(",
"$",
"version",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"version",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Define the wanted api.
@param string $version
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Define",
"the",
"wanted",
"api",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L119-L126
|
234,302
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setTimeouts
|
function setTimeouts($read = null, $write = null)
{
$this->xmlrpcClient->setTimeouts($read, $write);
}
|
php
|
function setTimeouts($read = null, $write = null)
{
$this->xmlrpcClient->setTimeouts($read, $write);
}
|
[
"function",
"setTimeouts",
"(",
"$",
"read",
"=",
"null",
",",
"$",
"write",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"xmlrpcClient",
"->",
"setTimeouts",
"(",
"$",
"read",
",",
"$",
"write",
")",
";",
"}"
] |
Change client timeouts
@param int $read read timeout (in ms), 0 to leave unchanged
@param int $write write timeout (in ms), 0 to leave unchanged
|
[
"Change",
"client",
"timeouts"
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L162-L165
|
234,303
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.executeMulticall
|
function executeMulticall()
{
$responses = $this->xmlrpcClient->multiquery();
foreach ($responses as $i => &$response) {
if (!($response instanceof Xmlrpc\FaultException) && is_callable($this->multicallHandlers[$i])) {
$response = call_user_func($this->multicallHandlers[$i], $response);
}
}
$this->multicallHandlers = array();
return $responses;
}
|
php
|
function executeMulticall()
{
$responses = $this->xmlrpcClient->multiquery();
foreach ($responses as $i => &$response) {
if (!($response instanceof Xmlrpc\FaultException) && is_callable($this->multicallHandlers[$i])) {
$response = call_user_func($this->multicallHandlers[$i], $response);
}
}
$this->multicallHandlers = array();
return $responses;
}
|
[
"function",
"executeMulticall",
"(",
")",
"{",
"$",
"responses",
"=",
"$",
"this",
"->",
"xmlrpcClient",
"->",
"multiquery",
"(",
")",
";",
"foreach",
"(",
"$",
"responses",
"as",
"$",
"i",
"=>",
"&",
"$",
"response",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"response",
"instanceof",
"Xmlrpc",
"\\",
"FaultException",
")",
"&&",
"is_callable",
"(",
"$",
"this",
"->",
"multicallHandlers",
"[",
"$",
"i",
"]",
")",
")",
"{",
"$",
"response",
"=",
"call_user_func",
"(",
"$",
"this",
"->",
"multicallHandlers",
"[",
"$",
"i",
"]",
",",
"$",
"response",
")",
";",
"}",
"}",
"$",
"this",
"->",
"multicallHandlers",
"=",
"array",
"(",
")",
";",
"return",
"$",
"responses",
";",
"}"
] |
Execute the calls in queue and return the result
@return mixed[]
|
[
"Execute",
"the",
"calls",
"in",
"queue",
"and",
"return",
"the",
"result"
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L188-L198
|
234,304
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getVersion
|
function getVersion($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Version'));
}
return Structures\Version::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getVersion($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Version'));
}
return Structures\Version::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getVersion",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'Version'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"Version",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns a struct with the Name, TitleId, Version, Build and ApiVersion of the application remotely controlled.
@param bool $multicall
@return Structures\Version
|
[
"Returns",
"a",
"struct",
"with",
"the",
"Name",
"TitleId",
"Version",
"Build",
"and",
"ApiVersion",
"of",
"the",
"application",
"remotely",
"controlled",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L242-L248
|
234,305
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getStatus
|
function getStatus($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Status'));
}
return Structures\Status::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getStatus($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Status'));
}
return Structures\Status::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getStatus",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'Status'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"Status",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns the current status of the server.
@param bool $multicall
@return Structures\Status
|
[
"Returns",
"the",
"current",
"status",
"of",
"the",
"server",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L265-L271
|
234,306
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getLogin
|
private function getLogin($player, $allowEmpty = false)
{
if (is_object($player)) {
if (property_exists($player, 'login')) {
$player = $player->login;
} else {
return false;
}
}
if (empty($player)) {
return $allowEmpty ? '' : false;
}
if (is_string($player)) {
return $player;
}
return false;
}
|
php
|
private function getLogin($player, $allowEmpty = false)
{
if (is_object($player)) {
if (property_exists($player, 'login')) {
$player = $player->login;
} else {
return false;
}
}
if (empty($player)) {
return $allowEmpty ? '' : false;
}
if (is_string($player)) {
return $player;
}
return false;
}
|
[
"private",
"function",
"getLogin",
"(",
"$",
"player",
",",
"$",
"allowEmpty",
"=",
"false",
")",
"{",
"if",
"(",
"is_object",
"(",
"$",
"player",
")",
")",
"{",
"if",
"(",
"property_exists",
"(",
"$",
"player",
",",
"'login'",
")",
")",
"{",
"$",
"player",
"=",
"$",
"player",
"->",
"login",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"if",
"(",
"empty",
"(",
"$",
"player",
")",
")",
"{",
"return",
"$",
"allowEmpty",
"?",
"''",
":",
"false",
";",
"}",
"if",
"(",
"is_string",
"(",
"$",
"player",
")",
")",
"{",
"return",
"$",
"player",
";",
"}",
"return",
"false",
";",
"}"
] |
Returns the login of the given player
@param mixed $player
@return string|bool
|
[
"Returns",
"the",
"login",
"of",
"the",
"given",
"player"
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L312-L328
|
234,307
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getCurrentCallVote
|
function getCurrentCallVote($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Vote'));
}
return Structures\Vote::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getCurrentCallVote($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Vote'));
}
return Structures\Vote::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getCurrentCallVote",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'Vote'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"Vote",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns the vote currently in progress.
@param $multicall
@return Structures\Vote
|
[
"Returns",
"the",
"vote",
"currently",
"in",
"progress",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L434-L440
|
234,308
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setCallVoteTimeOut
|
function setCallVoteTimeOut($timeout, $multicall = false)
{
if (!is_int($timeout)) {
throw new InvalidArgumentException('timeout = ' . print_r($timeout, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($timeout), $multicall);
}
|
php
|
function setCallVoteTimeOut($timeout, $multicall = false)
{
if (!is_int($timeout)) {
throw new InvalidArgumentException('timeout = ' . print_r($timeout, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($timeout), $multicall);
}
|
[
"function",
"setCallVoteTimeOut",
"(",
"$",
"timeout",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"timeout",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'timeout = '",
".",
"print_r",
"(",
"$",
"timeout",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"timeout",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new timeout for waiting for votes.
Only available to Admin.
@param int $timeout In milliseconds, 0 to disable votes
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"timeout",
"for",
"waiting",
"for",
"votes",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L450-L457
|
234,309
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setCallVoteRatio
|
function setCallVoteRatio($ratio, $multicall = false)
{
if (!Structures\VoteRatio::isRatio($ratio)) {
throw new InvalidArgumentException('ratio = ' . print_r($ratio, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($ratio), $multicall);
}
|
php
|
function setCallVoteRatio($ratio, $multicall = false)
{
if (!Structures\VoteRatio::isRatio($ratio)) {
throw new InvalidArgumentException('ratio = ' . print_r($ratio, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($ratio), $multicall);
}
|
[
"function",
"setCallVoteRatio",
"(",
"$",
"ratio",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"Structures",
"\\",
"VoteRatio",
"::",
"isRatio",
"(",
"$",
"ratio",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'ratio = '",
".",
"print_r",
"(",
"$",
"ratio",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"ratio",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new default ratio for passing a vote.
Only available to Admin.
@param float $ratio In range [0,1] or -1 to disable votes
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"default",
"ratio",
"for",
"passing",
"a",
"vote",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L477-L484
|
234,310
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setCallVoteRatios
|
function setCallVoteRatios($ratios, $replaceAll = true, $multicall = false)
{
if (!is_array($ratios)) {
throw new InvalidArgumentException('ratios = ' . print_r($ratios, true));
}
foreach ($ratios as $i => &$ratio) {
if (!($ratio instanceof Structures\VoteRatio && $ratio->isValid())) {
throw new InvalidArgumentException('ratios[' . $i . '] = ' . print_r($ratios, true));
}
$ratio = $ratio->toArray();
}
if (!is_bool($replaceAll)) {
throw new InvalidArgumentException('replaceAll = ' . print_r($replaceAll, true));
}
return $this->execute(ucfirst(__FUNCTION__) . 'Ex', array($replaceAll, $ratios), $multicall);
}
|
php
|
function setCallVoteRatios($ratios, $replaceAll = true, $multicall = false)
{
if (!is_array($ratios)) {
throw new InvalidArgumentException('ratios = ' . print_r($ratios, true));
}
foreach ($ratios as $i => &$ratio) {
if (!($ratio instanceof Structures\VoteRatio && $ratio->isValid())) {
throw new InvalidArgumentException('ratios[' . $i . '] = ' . print_r($ratios, true));
}
$ratio = $ratio->toArray();
}
if (!is_bool($replaceAll)) {
throw new InvalidArgumentException('replaceAll = ' . print_r($replaceAll, true));
}
return $this->execute(ucfirst(__FUNCTION__) . 'Ex', array($replaceAll, $ratios), $multicall);
}
|
[
"function",
"setCallVoteRatios",
"(",
"$",
"ratios",
",",
"$",
"replaceAll",
"=",
"true",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"ratios",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'ratios = '",
".",
"print_r",
"(",
"$",
"ratios",
",",
"true",
")",
")",
";",
"}",
"foreach",
"(",
"$",
"ratios",
"as",
"$",
"i",
"=>",
"&",
"$",
"ratio",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"ratio",
"instanceof",
"Structures",
"\\",
"VoteRatio",
"&&",
"$",
"ratio",
"->",
"isValid",
"(",
")",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'ratios['",
".",
"$",
"i",
".",
"'] = '",
".",
"print_r",
"(",
"$",
"ratios",
",",
"true",
")",
")",
";",
"}",
"$",
"ratio",
"=",
"$",
"ratio",
"->",
"toArray",
"(",
")",
";",
"}",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"replaceAll",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'replaceAll = '",
".",
"print_r",
"(",
"$",
"replaceAll",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
".",
"'Ex'",
",",
"array",
"(",
"$",
"replaceAll",
",",
"$",
"ratios",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set the ratios list for passing specific votes, extended version with parameters matching.
Only available to Admin.
@param Structures\VoteRatio[] $ratios
@param bool $replaceAll True to override the whole ratios list or false to modify only specified ratios
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"the",
"ratios",
"list",
"for",
"passing",
"specific",
"votes",
"extended",
"version",
"with",
"parameters",
"matching",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L514-L530
|
234,311
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getCallVoteRatios
|
function getCallVoteRatios($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__) . 'Ex', array(), $this->structHandler('VoteRatio', true));
}
return Structures\VoteRatio::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__) . 'Ex'));
}
|
php
|
function getCallVoteRatios($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__) . 'Ex', array(), $this->structHandler('VoteRatio', true));
}
return Structures\VoteRatio::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__) . 'Ex'));
}
|
[
"function",
"getCallVoteRatios",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
".",
"'Ex'",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'VoteRatio'",
",",
"true",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"VoteRatio",
"::",
"fromArrayOfArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
".",
"'Ex'",
")",
")",
";",
"}"
] |
Get the current ratios for passing votes, extended version with parameters matching.
@param bool $multicall
@return Structures\VoteRatio[]
|
[
"Get",
"the",
"current",
"ratios",
"for",
"passing",
"votes",
"extended",
"version",
"with",
"parameters",
"matching",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L546-L552
|
234,312
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.chatSendServerMessage
|
function chatSendServerMessage($message, $recipient = null, $multicall = false)
{
$logins = $this->getLogins($recipient, true);
if ($logins === false) {
throw new InvalidArgumentException('recipient = ' . print_r($recipient, true));
}
if (is_array($message)) {
return $this->execute(ucfirst(__FUNCTION__) . 'ToLanguage', array($message, $logins), $multicall);
}
if (is_string($message)) {
if ($logins) {
return $this->execute(ucfirst(__FUNCTION__) . 'ToLogin', array($message, $logins), $multicall);
}
return $this->execute(ucfirst(__FUNCTION__), array($message), $multicall);
}
// else
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
|
php
|
function chatSendServerMessage($message, $recipient = null, $multicall = false)
{
$logins = $this->getLogins($recipient, true);
if ($logins === false) {
throw new InvalidArgumentException('recipient = ' . print_r($recipient, true));
}
if (is_array($message)) {
return $this->execute(ucfirst(__FUNCTION__) . 'ToLanguage', array($message, $logins), $multicall);
}
if (is_string($message)) {
if ($logins) {
return $this->execute(ucfirst(__FUNCTION__) . 'ToLogin', array($message, $logins), $multicall);
}
return $this->execute(ucfirst(__FUNCTION__), array($message), $multicall);
}
// else
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
|
[
"function",
"chatSendServerMessage",
"(",
"$",
"message",
",",
"$",
"recipient",
"=",
"null",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"logins",
"=",
"$",
"this",
"->",
"getLogins",
"(",
"$",
"recipient",
",",
"true",
")",
";",
"if",
"(",
"$",
"logins",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'recipient = '",
".",
"print_r",
"(",
"$",
"recipient",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"is_array",
"(",
"$",
"message",
")",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
".",
"'ToLanguage'",
",",
"array",
"(",
"$",
"message",
",",
"$",
"logins",
")",
",",
"$",
"multicall",
")",
";",
"}",
"if",
"(",
"is_string",
"(",
"$",
"message",
")",
")",
"{",
"if",
"(",
"$",
"logins",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
".",
"'ToLogin'",
",",
"array",
"(",
"$",
"message",
",",
"$",
"logins",
")",
",",
"$",
"multicall",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"message",
")",
",",
"$",
"multicall",
")",
";",
"}",
"// else",
"throw",
"new",
"InvalidArgumentException",
"(",
"'message = '",
".",
"print_r",
"(",
"$",
"message",
",",
"true",
")",
")",
";",
"}"
] |
Send a text message, possibly localised to a specific login or to everyone, without the server login.
Only available to Admin.
@param string|string[][] $message Single string or array of structures {Lang='xx', Text='...'}:
if no matching language is found, the last text in the array is used
@param mixed $recipient Login, player object or array; null for all
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Send",
"a",
"text",
"message",
"possibly",
"localised",
"to",
"a",
"specific",
"login",
"or",
"to",
"everyone",
"without",
"the",
"server",
"login",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L573-L591
|
234,313
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getLogins
|
private function getLogins($players, $allowEmpty = false)
{
if (is_array($players)) {
$logins = array();
foreach ($players as $player) {
$login = $this->getLogin($player);
if ($login === false) {
return false;
}
$logins[] = $login;
}
return implode(',', $logins);
}
return $this->getLogin($players, $allowEmpty);
}
|
php
|
private function getLogins($players, $allowEmpty = false)
{
if (is_array($players)) {
$logins = array();
foreach ($players as $player) {
$login = $this->getLogin($player);
if ($login === false) {
return false;
}
$logins[] = $login;
}
return implode(',', $logins);
}
return $this->getLogin($players, $allowEmpty);
}
|
[
"private",
"function",
"getLogins",
"(",
"$",
"players",
",",
"$",
"allowEmpty",
"=",
"false",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"players",
")",
")",
"{",
"$",
"logins",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"players",
"as",
"$",
"player",
")",
"{",
"$",
"login",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"player",
")",
";",
"if",
"(",
"$",
"login",
"===",
"false",
")",
"{",
"return",
"false",
";",
"}",
"$",
"logins",
"[",
"]",
"=",
"$",
"login",
";",
"}",
"return",
"implode",
"(",
"','",
",",
"$",
"logins",
")",
";",
"}",
"return",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"players",
",",
"$",
"allowEmpty",
")",
";",
"}"
] |
Returns logins of given players
@param mixed $players
@return string|bool
|
[
"Returns",
"logins",
"of",
"given",
"players"
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L598-L613
|
234,314
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.chatEnableManualRouting
|
function chatEnableManualRouting($enable = true, $excludeServer = false, $multicall = false)
{
if (!is_bool($enable)) {
throw new InvalidArgumentException('enable = ' . print_r($enable, true));
}
if (!is_bool($excludeServer)) {
throw new InvalidArgumentException('excludeServer = ' . print_r($excludeServer, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($enable, $excludeServer), $multicall);
}
|
php
|
function chatEnableManualRouting($enable = true, $excludeServer = false, $multicall = false)
{
if (!is_bool($enable)) {
throw new InvalidArgumentException('enable = ' . print_r($enable, true));
}
if (!is_bool($excludeServer)) {
throw new InvalidArgumentException('excludeServer = ' . print_r($excludeServer, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($enable, $excludeServer), $multicall);
}
|
[
"function",
"chatEnableManualRouting",
"(",
"$",
"enable",
"=",
"true",
",",
"$",
"excludeServer",
"=",
"false",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"enable",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'enable = '",
".",
"print_r",
"(",
"$",
"enable",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"excludeServer",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'excludeServer = '",
".",
"print_r",
"(",
"$",
"excludeServer",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"enable",
",",
"$",
"excludeServer",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
The chat messages are no longer dispatched to the players, they only go to the rpc callback and the controller has to manually forward them.
Only available to Admin.
@param bool $enable
@param bool $excludeServer Allows all messages from the server to be automatically forwarded.
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"The",
"chat",
"messages",
"are",
"no",
"longer",
"dispatched",
"to",
"the",
"players",
"they",
"only",
"go",
"to",
"the",
"rpc",
"callback",
"and",
"the",
"controller",
"has",
"to",
"manually",
"forward",
"them",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L674-L684
|
234,315
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.sendNotice
|
function sendNotice($recipient, $message, $avatar = null, $variant = 0, $multicall = false)
{
$logins = $this->getLogins($recipient, true);
if ($logins === false) {
throw new InvalidArgumentException('recipient = ' . print_r($recipient, true));
}
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
$avatarLogin = $this->getLogin($avatar, true);
if ($avatarLogin === false) {
throw new InvalidArgumentException('avatar = ' . print_r($avatar, true));
}
if (!is_int($variant) || $variant < 0 || $variant > 2) {
throw new InvalidArgumentException('variant = ' . print_r($variant, true));
}
if ($logins) {
return $this->execute(ucfirst(__FUNCTION__) . 'ToLogin', array($logins, $message, $avatarLogin, $variant), $multicall);
}
return $this->execute(ucfirst(__FUNCTION__), array($message, $avatar, $variant), $multicall);
}
|
php
|
function sendNotice($recipient, $message, $avatar = null, $variant = 0, $multicall = false)
{
$logins = $this->getLogins($recipient, true);
if ($logins === false) {
throw new InvalidArgumentException('recipient = ' . print_r($recipient, true));
}
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
$avatarLogin = $this->getLogin($avatar, true);
if ($avatarLogin === false) {
throw new InvalidArgumentException('avatar = ' . print_r($avatar, true));
}
if (!is_int($variant) || $variant < 0 || $variant > 2) {
throw new InvalidArgumentException('variant = ' . print_r($variant, true));
}
if ($logins) {
return $this->execute(ucfirst(__FUNCTION__) . 'ToLogin', array($logins, $message, $avatarLogin, $variant), $multicall);
}
return $this->execute(ucfirst(__FUNCTION__), array($message, $avatar, $variant), $multicall);
}
|
[
"function",
"sendNotice",
"(",
"$",
"recipient",
",",
"$",
"message",
",",
"$",
"avatar",
"=",
"null",
",",
"$",
"variant",
"=",
"0",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"logins",
"=",
"$",
"this",
"->",
"getLogins",
"(",
"$",
"recipient",
",",
"true",
")",
";",
"if",
"(",
"$",
"logins",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'recipient = '",
".",
"print_r",
"(",
"$",
"recipient",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"message",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'message = '",
".",
"print_r",
"(",
"$",
"message",
",",
"true",
")",
")",
";",
"}",
"$",
"avatarLogin",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"avatar",
",",
"true",
")",
";",
"if",
"(",
"$",
"avatarLogin",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'avatar = '",
".",
"print_r",
"(",
"$",
"avatar",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"variant",
")",
"||",
"$",
"variant",
"<",
"0",
"||",
"$",
"variant",
">",
"2",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'variant = '",
".",
"print_r",
"(",
"$",
"variant",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"logins",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
".",
"'ToLogin'",
",",
"array",
"(",
"$",
"logins",
",",
"$",
"message",
",",
"$",
"avatarLogin",
",",
"$",
"variant",
")",
",",
"$",
"multicall",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"message",
",",
"$",
"avatar",
",",
"$",
"variant",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Display a notice on all clients.
Only available to Admin.
@param mixed $recipient Login, player object or array; empty for all
@param string $message
@param mixed $avatar Login or player object whose avatar will be displayed; empty for none
@param int $variant 0: normal, 1: sad, 2: happy
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Display",
"a",
"notice",
"on",
"all",
"clients",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L735-L756
|
234,316
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.sendDisplayManialinkPage
|
function sendDisplayManialinkPage($recipient, $manialinks, $timeout = 0, $hideOnClick = false, $multicall = false)
{
$logins = $this->getLogins($recipient, true);
if ($logins === false) {
throw new InvalidArgumentException('recipient = ' . print_r($recipient, true));
}
if (!is_string($manialinks)) {
throw new InvalidArgumentException('manialinks = ' . print_r($manialinks, true));
}
if (!is_int($timeout)) {
throw new InvalidArgumentException('timeout = ' . print_r($timeout, true));
}
if (!is_bool($hideOnClick)) {
throw new InvalidArgumentException('hideOnClick = ' . print_r($hideOnClick, true));
}
if ($logins) {
return $this->execute(ucfirst(__FUNCTION__) . 'ToLogin', array($logins, $manialinks, $timeout, $hideOnClick), $multicall);
}
return $this->execute(ucfirst(__FUNCTION__), array($manialinks, $timeout, $hideOnClick), $multicall);
}
|
php
|
function sendDisplayManialinkPage($recipient, $manialinks, $timeout = 0, $hideOnClick = false, $multicall = false)
{
$logins = $this->getLogins($recipient, true);
if ($logins === false) {
throw new InvalidArgumentException('recipient = ' . print_r($recipient, true));
}
if (!is_string($manialinks)) {
throw new InvalidArgumentException('manialinks = ' . print_r($manialinks, true));
}
if (!is_int($timeout)) {
throw new InvalidArgumentException('timeout = ' . print_r($timeout, true));
}
if (!is_bool($hideOnClick)) {
throw new InvalidArgumentException('hideOnClick = ' . print_r($hideOnClick, true));
}
if ($logins) {
return $this->execute(ucfirst(__FUNCTION__) . 'ToLogin', array($logins, $manialinks, $timeout, $hideOnClick), $multicall);
}
return $this->execute(ucfirst(__FUNCTION__), array($manialinks, $timeout, $hideOnClick), $multicall);
}
|
[
"function",
"sendDisplayManialinkPage",
"(",
"$",
"recipient",
",",
"$",
"manialinks",
",",
"$",
"timeout",
"=",
"0",
",",
"$",
"hideOnClick",
"=",
"false",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"logins",
"=",
"$",
"this",
"->",
"getLogins",
"(",
"$",
"recipient",
",",
"true",
")",
";",
"if",
"(",
"$",
"logins",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'recipient = '",
".",
"print_r",
"(",
"$",
"recipient",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"manialinks",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'manialinks = '",
".",
"print_r",
"(",
"$",
"manialinks",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"timeout",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'timeout = '",
".",
"print_r",
"(",
"$",
"timeout",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"hideOnClick",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'hideOnClick = '",
".",
"print_r",
"(",
"$",
"hideOnClick",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"logins",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
".",
"'ToLogin'",
",",
"array",
"(",
"$",
"logins",
",",
"$",
"manialinks",
",",
"$",
"timeout",
",",
"$",
"hideOnClick",
")",
",",
"$",
"multicall",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"manialinks",
",",
"$",
"timeout",
",",
"$",
"hideOnClick",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Display a manialink page on all clients.
Only available to Admin.
@param mixed $recipient Login, player object or array; empty for all
@param string $manialinks XML string
@param int $timeout Seconds before autohide, 0 for permanent
@param bool $hideOnClick Hide as soon as the user clicks on a page option
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Display",
"a",
"manialink",
"page",
"on",
"all",
"clients",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L769-L789
|
234,317
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.sendHideManialinkPage
|
function sendHideManialinkPage($recipient = null, $multicall = false)
{
$logins = $this->getLogins($recipient, true);
if ($logins === false) {
throw new InvalidArgumentException('recipient = ' . print_r($recipient, true));
}
if ($logins) {
return $this->execute(ucfirst(__FUNCTION__) . 'ToLogin', array($logins), $multicall);
}
return $this->execute(ucfirst(__FUNCTION__), array(), $multicall);
}
|
php
|
function sendHideManialinkPage($recipient = null, $multicall = false)
{
$logins = $this->getLogins($recipient, true);
if ($logins === false) {
throw new InvalidArgumentException('recipient = ' . print_r($recipient, true));
}
if ($logins) {
return $this->execute(ucfirst(__FUNCTION__) . 'ToLogin', array($logins), $multicall);
}
return $this->execute(ucfirst(__FUNCTION__), array(), $multicall);
}
|
[
"function",
"sendHideManialinkPage",
"(",
"$",
"recipient",
"=",
"null",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"logins",
"=",
"$",
"this",
"->",
"getLogins",
"(",
"$",
"recipient",
",",
"true",
")",
";",
"if",
"(",
"$",
"logins",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'recipient = '",
".",
"print_r",
"(",
"$",
"recipient",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"logins",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
".",
"'ToLogin'",
",",
"array",
"(",
"$",
"logins",
")",
",",
"$",
"multicall",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Hide the displayed manialink page.
Only available to Admin.
@param mixed $recipient Login, player object or array; empty for all
@param bool $multicall
@return bool
|
[
"Hide",
"the",
"displayed",
"manialink",
"page",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L798-L809
|
234,318
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.sendOpenLink
|
function sendOpenLink($recipient, $link, $linkType, $multicall = false)
{
$logins = $this->getLogins($recipient);
if ($logins === false) {
throw new InvalidArgumentException('recipient = ' . print_r($recipient, true));
}
if (!is_string($link)) {
throw new InvalidArgumentException('link = ' . print_r($link, true));
}
if ($linkType !== 0 && $linkType !== 1) {
throw new InvalidArgumentException('linkType = ' . print_r($linkType, true));
}
return $this->execute(ucfirst(__FUNCTION__) . 'ToLogin', array($logins, $link, $linkType), $multicall);
}
|
php
|
function sendOpenLink($recipient, $link, $linkType, $multicall = false)
{
$logins = $this->getLogins($recipient);
if ($logins === false) {
throw new InvalidArgumentException('recipient = ' . print_r($recipient, true));
}
if (!is_string($link)) {
throw new InvalidArgumentException('link = ' . print_r($link, true));
}
if ($linkType !== 0 && $linkType !== 1) {
throw new InvalidArgumentException('linkType = ' . print_r($linkType, true));
}
return $this->execute(ucfirst(__FUNCTION__) . 'ToLogin', array($logins, $link, $linkType), $multicall);
}
|
[
"function",
"sendOpenLink",
"(",
"$",
"recipient",
",",
"$",
"link",
",",
"$",
"linkType",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"logins",
"=",
"$",
"this",
"->",
"getLogins",
"(",
"$",
"recipient",
")",
";",
"if",
"(",
"$",
"logins",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'recipient = '",
".",
"print_r",
"(",
"$",
"recipient",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"link",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'link = '",
".",
"print_r",
"(",
"$",
"link",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"linkType",
"!==",
"0",
"&&",
"$",
"linkType",
"!==",
"1",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'linkType = '",
".",
"print_r",
"(",
"$",
"linkType",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
".",
"'ToLogin'",
",",
"array",
"(",
"$",
"logins",
",",
"$",
"link",
",",
"$",
"linkType",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Opens a link in the client with the specified login.
Only available to Admin.
@param mixed $recipient Login, player object or array
@param string $link URL to open
@param int $linkType 0: in the external browser, 1: in the internal manialink browser
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Opens",
"a",
"link",
"in",
"the",
"client",
"with",
"the",
"specified",
"login",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L836-L850
|
234,319
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.kick
|
function kick($player, $message = '', $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login, $message), $multicall);
}
|
php
|
function kick($player, $message = '', $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login, $message), $multicall);
}
|
[
"function",
"kick",
"(",
"$",
"player",
",",
"$",
"message",
"=",
"''",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"login",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"player",
")",
";",
"if",
"(",
"$",
"login",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'player = '",
".",
"print_r",
"(",
"$",
"player",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"message",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'message = '",
".",
"print_r",
"(",
"$",
"message",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"login",
",",
"$",
"message",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Kick the player with the specified login, with an optional message.
Only available to Admin.
@param mixed $player Login or player object
@param string $message
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Kick",
"the",
"player",
"with",
"the",
"specified",
"login",
"with",
"an",
"optional",
"message",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L881-L892
|
234,320
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.banAndBlackList
|
function banAndBlackList($player, $message = '', $save = false, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
if (!is_bool($save)) {
throw new InvalidArgumentException('save = ' . print_r($save, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($player, $message, $save), $multicall);
}
|
php
|
function banAndBlackList($player, $message = '', $save = false, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
if (!is_bool($save)) {
throw new InvalidArgumentException('save = ' . print_r($save, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($player, $message, $save), $multicall);
}
|
[
"function",
"banAndBlackList",
"(",
"$",
"player",
",",
"$",
"message",
"=",
"''",
",",
"$",
"save",
"=",
"false",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"login",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"player",
")",
";",
"if",
"(",
"$",
"login",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'player = '",
".",
"print_r",
"(",
"$",
"player",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"message",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'message = '",
".",
"print_r",
"(",
"$",
"message",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"save",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'save = '",
".",
"print_r",
"(",
"$",
"save",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"player",
",",
"$",
"message",
",",
"$",
"save",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Ban the player with the specified login, with a message.
Add it to the black list, and optionally save the new list.
Only available to Admin.
@param mixed $player Login or player object
@param string $message
@param bool $save
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Ban",
"the",
"player",
"with",
"the",
"specified",
"login",
"with",
"a",
"message",
".",
"Add",
"it",
"to",
"the",
"black",
"list",
"and",
"optionally",
"save",
"the",
"new",
"list",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L927-L941
|
234,321
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.unBan
|
function unBan($player, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login), $multicall);
}
|
php
|
function unBan($player, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login), $multicall);
}
|
[
"function",
"unBan",
"(",
"$",
"player",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"login",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"player",
")",
";",
"if",
"(",
"$",
"login",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'player = '",
".",
"print_r",
"(",
"$",
"player",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"login",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Unban the player with the specified login.
Only available to Admin.
@param mixed $player Login or player object
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Unban",
"the",
"player",
"with",
"the",
"specified",
"login",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L951-L959
|
234,322
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getBanList
|
function getBanList($length = -1, $offset = 0, $multicall = false)
{
if (!is_int($length)) {
throw new InvalidArgumentException('length = ' . print_r($length, true));
}
if (!is_int($offset)) {
throw new InvalidArgumentException('offset = ' . print_r($offset, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($length, $offset), $this->structHandler('PlayerBan', true));
}
return Structures\PlayerBan::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset)));
}
|
php
|
function getBanList($length = -1, $offset = 0, $multicall = false)
{
if (!is_int($length)) {
throw new InvalidArgumentException('length = ' . print_r($length, true));
}
if (!is_int($offset)) {
throw new InvalidArgumentException('offset = ' . print_r($offset, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($length, $offset), $this->structHandler('PlayerBan', true));
}
return Structures\PlayerBan::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset)));
}
|
[
"function",
"getBanList",
"(",
"$",
"length",
"=",
"-",
"1",
",",
"$",
"offset",
"=",
"0",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"length",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'length = '",
".",
"print_r",
"(",
"$",
"length",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"offset",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'offset = '",
".",
"print_r",
"(",
"$",
"offset",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"length",
",",
"$",
"offset",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'PlayerBan'",
",",
"true",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"PlayerBan",
"::",
"fromArrayOfArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"length",
",",
"$",
"offset",
")",
")",
")",
";",
"}"
] |
Returns the list of banned players.
@param int $length Maximum number of infos to be returned
@param int $offset Starting index in the list
@param bool $multicall
@return Structures\PlayerBan[]
@throws InvalidArgumentException
|
[
"Returns",
"the",
"list",
"of",
"banned",
"players",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L980-L993
|
234,323
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getGuestList
|
function getGuestList($length = -1, $offset = 0, $multicall = false)
{
if (!is_int($length)) {
throw new InvalidArgumentException('length = ' . print_r($length, true));
}
if (!is_int($offset)) {
throw new InvalidArgumentException('offset = ' . print_r($offset, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($length, $offset), $this->structHandler('Player', true));
}
return Structures\Player::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset)));
}
|
php
|
function getGuestList($length = -1, $offset = 0, $multicall = false)
{
if (!is_int($length)) {
throw new InvalidArgumentException('length = ' . print_r($length, true));
}
if (!is_int($offset)) {
throw new InvalidArgumentException('offset = ' . print_r($offset, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($length, $offset), $this->structHandler('Player', true));
}
return Structures\Player::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset)));
}
|
[
"function",
"getGuestList",
"(",
"$",
"length",
"=",
"-",
"1",
",",
"$",
"offset",
"=",
"0",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"length",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'length = '",
".",
"print_r",
"(",
"$",
"length",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"offset",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'offset = '",
".",
"print_r",
"(",
"$",
"offset",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"length",
",",
"$",
"offset",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'Player'",
",",
"true",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"Player",
"::",
"fromArrayOfArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"length",
",",
"$",
"offset",
")",
")",
")",
";",
"}"
] |
Returns the list of players on the guest list.
@param int $length Maximum number of infos to be returned
@param int $offset Starting index in the list
@param bool $multicall
@return Structures\Player[]
@throws InvalidArgumentException
|
[
"Returns",
"the",
"list",
"of",
"players",
"on",
"the",
"guest",
"list",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1184-L1197
|
234,324
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setBuddyNotification
|
function setBuddyNotification($player, $enable, $multicall = false)
{
$login = $this->getLogin($player, true);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if (!is_bool($enable)) {
throw new InvalidArgumentException('enable = ' . print_r($enable, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login, $enable), $multicall);
}
|
php
|
function setBuddyNotification($player, $enable, $multicall = false)
{
$login = $this->getLogin($player, true);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if (!is_bool($enable)) {
throw new InvalidArgumentException('enable = ' . print_r($enable, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login, $enable), $multicall);
}
|
[
"function",
"setBuddyNotification",
"(",
"$",
"player",
",",
"$",
"enable",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"login",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"player",
",",
"true",
")",
";",
"if",
"(",
"$",
"login",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'player = '",
".",
"print_r",
"(",
"$",
"player",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"enable",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'enable = '",
".",
"print_r",
"(",
"$",
"enable",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"login",
",",
"$",
"enable",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Sets whether buddy notifications should be sent in the chat.
Only available to Admin.
@param mixed $player Login or player object; empty for global setting
@param bool $enable
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Sets",
"whether",
"buddy",
"notifications",
"should",
"be",
"sent",
"in",
"the",
"chat",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1244-L1255
|
234,325
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.dedicatedEcho
|
function dedicatedEcho($message, $callback = '', $multicall = false)
{
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
if (!is_string($callback)) {
throw new InvalidArgumentException('callback = ' . print_r($callback, true));
}
return $this->execute('Echo', array($message, $callback), $multicall);
}
|
php
|
function dedicatedEcho($message, $callback = '', $multicall = false)
{
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
if (!is_string($callback)) {
throw new InvalidArgumentException('callback = ' . print_r($callback, true));
}
return $this->execute('Echo', array($message, $callback), $multicall);
}
|
[
"function",
"dedicatedEcho",
"(",
"$",
"message",
",",
"$",
"callback",
"=",
"''",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"message",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'message = '",
".",
"print_r",
"(",
"$",
"message",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"callback",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'callback = '",
".",
"print_r",
"(",
"$",
"callback",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"'Echo'",
",",
"array",
"(",
"$",
"message",
",",
"$",
"callback",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Just log the parameters and invoke a callback.
Can be used to talk to other xmlrpc clients connected, or to make custom votes.
If used in a callvote, the first parameter will be used as the vote message on the clients.
Only available to Admin.
@param string $message
@param string $callback
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Just",
"log",
"the",
"parameters",
"and",
"invoke",
"a",
"callback",
".",
"Can",
"be",
"used",
"to",
"talk",
"to",
"other",
"xmlrpc",
"clients",
"connected",
"or",
"to",
"make",
"custom",
"votes",
".",
"If",
"used",
"in",
"a",
"callvote",
"the",
"first",
"parameter",
"will",
"be",
"used",
"as",
"the",
"vote",
"message",
"on",
"the",
"clients",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1369-L1379
|
234,326
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.pay
|
function pay($payee, $amount, $message = '', $multicall = false)
{
$login = $this->getLogin($payee);
if ($login === false) {
throw new InvalidArgumentException('payee = ' . print_r($payee, true));
}
if (!is_int($amount) || $amount < 1) {
throw new InvalidArgumentException('amount = ' . print_r($amount, true));
}
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login, $amount, $message), $multicall);
}
|
php
|
function pay($payee, $amount, $message = '', $multicall = false)
{
$login = $this->getLogin($payee);
if ($login === false) {
throw new InvalidArgumentException('payee = ' . print_r($payee, true));
}
if (!is_int($amount) || $amount < 1) {
throw new InvalidArgumentException('amount = ' . print_r($amount, true));
}
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login, $amount, $message), $multicall);
}
|
[
"function",
"pay",
"(",
"$",
"payee",
",",
"$",
"amount",
",",
"$",
"message",
"=",
"''",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"login",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"payee",
")",
";",
"if",
"(",
"$",
"login",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'payee = '",
".",
"print_r",
"(",
"$",
"payee",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"amount",
")",
"||",
"$",
"amount",
"<",
"1",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'amount = '",
".",
"print_r",
"(",
"$",
"amount",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"message",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'message = '",
".",
"print_r",
"(",
"$",
"message",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"login",
",",
"$",
"amount",
",",
"$",
"message",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Pay planets from the server account to a player.
The creation of the transaction itself may cost planets, so you need to have planets on the server account.
Only available to Admin.
@param mixed $payee Login or player object
@param int $amount
@param string $message
@param bool $multicall
@return int BillId
@throws InvalidArgumentException
|
[
"Pay",
"planets",
"from",
"the",
"server",
"account",
"to",
"a",
"player",
".",
"The",
"creation",
"of",
"the",
"transaction",
"itself",
"may",
"cost",
"planets",
"so",
"you",
"need",
"to",
"have",
"planets",
"on",
"the",
"server",
"account",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1462-L1476
|
234,327
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.sendBill
|
function sendBill($payer, $amount, $message = '', $payee = null, $multicall = false)
{
$payerLogin = $this->getLogin($payer);
if ($payerLogin === false) {
throw new InvalidArgumentException('payer = ' . print_r($payer, true));
}
if (!is_int($amount) || $amount < 1) {
throw new InvalidArgumentException('amount = ' . print_r($amount, true));
}
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
$payeeLogin = $this->getLogin($payee, true);
if ($payeeLogin === false) {
throw new InvalidArgumentException('payee = ' . print_r($payee, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($payerLogin, $amount, $message, $payeeLogin), $multicall);
}
|
php
|
function sendBill($payer, $amount, $message = '', $payee = null, $multicall = false)
{
$payerLogin = $this->getLogin($payer);
if ($payerLogin === false) {
throw new InvalidArgumentException('payer = ' . print_r($payer, true));
}
if (!is_int($amount) || $amount < 1) {
throw new InvalidArgumentException('amount = ' . print_r($amount, true));
}
if (!is_string($message)) {
throw new InvalidArgumentException('message = ' . print_r($message, true));
}
$payeeLogin = $this->getLogin($payee, true);
if ($payeeLogin === false) {
throw new InvalidArgumentException('payee = ' . print_r($payee, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($payerLogin, $amount, $message, $payeeLogin), $multicall);
}
|
[
"function",
"sendBill",
"(",
"$",
"payer",
",",
"$",
"amount",
",",
"$",
"message",
"=",
"''",
",",
"$",
"payee",
"=",
"null",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"payerLogin",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"payer",
")",
";",
"if",
"(",
"$",
"payerLogin",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'payer = '",
".",
"print_r",
"(",
"$",
"payer",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"amount",
")",
"||",
"$",
"amount",
"<",
"1",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'amount = '",
".",
"print_r",
"(",
"$",
"amount",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"message",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'message = '",
".",
"print_r",
"(",
"$",
"message",
",",
"true",
")",
")",
";",
"}",
"$",
"payeeLogin",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"payee",
",",
"true",
")",
";",
"if",
"(",
"$",
"payeeLogin",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'payee = '",
".",
"print_r",
"(",
"$",
"payee",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"payerLogin",
",",
"$",
"amount",
",",
"$",
"message",
",",
"$",
"payeeLogin",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Create a bill, send it to a player, and return the BillId.
The creation of the transaction itself may cost planets, so you need to have planets on the server account.
Only available to Admin.
@param mixed $payer Login or player object
@param int $amount
@param string $message
@param mixed $payee Login or player object; empty for server account
@param bool $multicall
@return int BillId
@throws InvalidArgumentException
|
[
"Create",
"a",
"bill",
"send",
"it",
"to",
"a",
"player",
"and",
"return",
"the",
"BillId",
".",
"The",
"creation",
"of",
"the",
"transaction",
"itself",
"may",
"cost",
"planets",
"so",
"you",
"need",
"to",
"have",
"planets",
"on",
"the",
"server",
"account",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1490-L1508
|
234,328
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getBillState
|
function getBillState($billId, $multicall = false)
{
if (!is_int($billId)) {
throw new InvalidArgumentException('billId = ' . print_r($billId, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($billId), $this->structHandler('Bill'));
}
return Structures\Bill::fromArray($this->execute(ucfirst(__FUNCTION__), array($billId)));
}
|
php
|
function getBillState($billId, $multicall = false)
{
if (!is_int($billId)) {
throw new InvalidArgumentException('billId = ' . print_r($billId, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($billId), $this->structHandler('Bill'));
}
return Structures\Bill::fromArray($this->execute(ucfirst(__FUNCTION__), array($billId)));
}
|
[
"function",
"getBillState",
"(",
"$",
"billId",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"billId",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'billId = '",
".",
"print_r",
"(",
"$",
"billId",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"billId",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'Bill'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"Bill",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"billId",
")",
")",
")",
";",
"}"
] |
Returns the current state of a bill.
@param int $billId
@param bool $multicall
@return Structures\Bill
@throws InvalidArgumentException
|
[
"Returns",
"the",
"current",
"state",
"of",
"a",
"bill",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1517-L1527
|
234,329
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getServerTags
|
function getServerTags($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Tag', true));
}
return Structures\Tag::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getServerTags($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Tag', true));
}
return Structures\Tag::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getServerTags",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'Tag'",
",",
"true",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"Tag",
"::",
"fromArrayOfArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns the list of tags and associated values set on this server.
Only available to Admin.
@param bool $multicall
@return Structures\Tag[]
|
[
"Returns",
"the",
"list",
"of",
"tags",
"and",
"associated",
"values",
"set",
"on",
"this",
"server",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1578-L1584
|
234,330
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setServerTag
|
function setServerTag($key, $value, $multicall = false)
{
if (!is_string($key)) {
throw new InvalidArgumentException('key = ' . print_r($key, true));
}
if (!is_string($value)) {
throw new InvalidArgumentException('value = ' . print_r($value, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($key, $value), $multicall);
}
|
php
|
function setServerTag($key, $value, $multicall = false)
{
if (!is_string($key)) {
throw new InvalidArgumentException('key = ' . print_r($key, true));
}
if (!is_string($value)) {
throw new InvalidArgumentException('value = ' . print_r($value, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($key, $value), $multicall);
}
|
[
"function",
"setServerTag",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"key",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'key = '",
".",
"print_r",
"(",
"$",
"key",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"value",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'value = '",
".",
"print_r",
"(",
"$",
"value",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"key",
",",
"$",
"value",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a tag and its value on the server.
Only available to Admin.
@param string $key
@param string $value
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"tag",
"and",
"its",
"value",
"on",
"the",
"server",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1595-L1605
|
234,331
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.unsetServerTag
|
function unsetServerTag($key, $multicall = false)
{
if (!is_string($key)) {
throw new InvalidArgumentException('key = ' . print_r($key, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($key), $multicall);
}
|
php
|
function unsetServerTag($key, $multicall = false)
{
if (!is_string($key)) {
throw new InvalidArgumentException('key = ' . print_r($key, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($key), $multicall);
}
|
[
"function",
"unsetServerTag",
"(",
"$",
"key",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"key",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'key = '",
".",
"print_r",
"(",
"$",
"key",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"key",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Unset the tag with the specified name on the server.
Only available to Admin.
@param string $key
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Unset",
"the",
"tag",
"with",
"the",
"specified",
"name",
"on",
"the",
"server",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1615-L1622
|
234,332
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setServerName
|
function setServerName($name, $multicall = false)
{
if (!is_string($name)) {
throw new InvalidArgumentException('name = ' . print_r($name, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($name), $multicall);
}
|
php
|
function setServerName($name, $multicall = false)
{
if (!is_string($name)) {
throw new InvalidArgumentException('name = ' . print_r($name, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($name), $multicall);
}
|
[
"function",
"setServerName",
"(",
"$",
"name",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"name",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'name = '",
".",
"print_r",
"(",
"$",
"name",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"name",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new server name in utf8 format.
Only available to Admin.
@param string $name
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"server",
"name",
"in",
"utf8",
"format",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1643-L1650
|
234,333
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setServerComment
|
function setServerComment($comment, $multicall = false)
{
if (!is_string($comment)) {
throw new InvalidArgumentException('comment = ' . print_r($comment, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($comment), $multicall);
}
|
php
|
function setServerComment($comment, $multicall = false)
{
if (!is_string($comment)) {
throw new InvalidArgumentException('comment = ' . print_r($comment, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($comment), $multicall);
}
|
[
"function",
"setServerComment",
"(",
"$",
"comment",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"comment",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'comment = '",
".",
"print_r",
"(",
"$",
"comment",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"comment",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new server comment in utf8 format.
Only available to Admin.
@param string $comment
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"server",
"comment",
"in",
"utf8",
"format",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1670-L1677
|
234,334
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setHideServer
|
function setHideServer($visibility, $multicall = false)
{
if (!is_int($visibility) || $visibility < 0 || $visibility > 2) {
throw new InvalidArgumentException('visibility = ' . print_r($visibility, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($visibility), $multicall);
}
|
php
|
function setHideServer($visibility, $multicall = false)
{
if (!is_int($visibility) || $visibility < 0 || $visibility > 2) {
throw new InvalidArgumentException('visibility = ' . print_r($visibility, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($visibility), $multicall);
}
|
[
"function",
"setHideServer",
"(",
"$",
"visibility",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"visibility",
")",
"||",
"$",
"visibility",
"<",
"0",
"||",
"$",
"visibility",
">",
"2",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'visibility = '",
".",
"print_r",
"(",
"$",
"visibility",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"visibility",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set whether the server should be hidden from the public server list.
Only available to Admin.
@param int $visibility 0: visible, 1: always hidden, 2: hidden from nations
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"whether",
"the",
"server",
"should",
"be",
"hidden",
"from",
"the",
"public",
"server",
"list",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1697-L1704
|
234,335
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setServerPassword
|
function setServerPassword($password, $multicall = false)
{
if (!is_string($password)) {
throw new InvalidArgumentException('password = ' . print_r($password, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($password), $multicall);
}
|
php
|
function setServerPassword($password, $multicall = false)
{
if (!is_string($password)) {
throw new InvalidArgumentException('password = ' . print_r($password, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($password), $multicall);
}
|
[
"function",
"setServerPassword",
"(",
"$",
"password",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"password",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'password = '",
".",
"print_r",
"(",
"$",
"password",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"password",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new password for the server.
Only available to Admin.
@param string $password
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"password",
"for",
"the",
"server",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1734-L1741
|
234,336
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setMaxPlayers
|
function setMaxPlayers($maxPlayers, $multicall = false)
{
if (!is_int($maxPlayers)) {
throw new InvalidArgumentException('maxPlayers = ' . print_r($maxPlayers, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($maxPlayers), $multicall);
}
|
php
|
function setMaxPlayers($maxPlayers, $multicall = false)
{
if (!is_int($maxPlayers)) {
throw new InvalidArgumentException('maxPlayers = ' . print_r($maxPlayers, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($maxPlayers), $multicall);
}
|
[
"function",
"setMaxPlayers",
"(",
"$",
"maxPlayers",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"maxPlayers",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'maxPlayers = '",
".",
"print_r",
"(",
"$",
"maxPlayers",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"maxPlayers",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new maximum number of players.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $maxPlayers
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"maximum",
"number",
"of",
"players",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1789-L1796
|
234,337
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setMaxSpectators
|
function setMaxSpectators($maxSpectators, $multicall = false)
{
if (!is_int($maxSpectators)) {
throw new InvalidArgumentException('maxSpectators = ' . print_r($maxSpectators, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($maxSpectators), $multicall);
}
|
php
|
function setMaxSpectators($maxSpectators, $multicall = false)
{
if (!is_int($maxSpectators)) {
throw new InvalidArgumentException('maxSpectators = ' . print_r($maxSpectators, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($maxSpectators), $multicall);
}
|
[
"function",
"setMaxSpectators",
"(",
"$",
"maxSpectators",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"maxSpectators",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'maxSpectators = '",
".",
"print_r",
"(",
"$",
"maxSpectators",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"maxSpectators",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new maximum number of spectators.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $maxSpectators
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"maximum",
"number",
"of",
"spectators",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1817-L1824
|
234,338
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setLobbyInfo
|
function setLobbyInfo($isLobby, $currentPlayers, $maxPlayers, $averageLevel, $multicall = false)
{
if (!is_bool($isLobby)) {
throw new InvalidArgumentException('isLobby = ' . print_r($isLobby, true));
}
if (!is_int($currentPlayers)) {
throw new InvalidArgumentException('currentPlayers = ' . print_r($currentPlayers, true));
}
if (!is_int($maxPlayers)) {
throw new InvalidArgumentException('maxPlayers = ' . print_r($maxPlayers, true));
}
if (!is_float($averageLevel)) {
throw new InvalidArgumentException('averageLevel = ' . print_r($averageLevel, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($isLobby, $currentPlayers, $maxPlayers, $averageLevel), $multicall);
}
|
php
|
function setLobbyInfo($isLobby, $currentPlayers, $maxPlayers, $averageLevel, $multicall = false)
{
if (!is_bool($isLobby)) {
throw new InvalidArgumentException('isLobby = ' . print_r($isLobby, true));
}
if (!is_int($currentPlayers)) {
throw new InvalidArgumentException('currentPlayers = ' . print_r($currentPlayers, true));
}
if (!is_int($maxPlayers)) {
throw new InvalidArgumentException('maxPlayers = ' . print_r($maxPlayers, true));
}
if (!is_float($averageLevel)) {
throw new InvalidArgumentException('averageLevel = ' . print_r($averageLevel, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($isLobby, $currentPlayers, $maxPlayers, $averageLevel), $multicall);
}
|
[
"function",
"setLobbyInfo",
"(",
"$",
"isLobby",
",",
"$",
"currentPlayers",
",",
"$",
"maxPlayers",
",",
"$",
"averageLevel",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"isLobby",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'isLobby = '",
".",
"print_r",
"(",
"$",
"isLobby",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"currentPlayers",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'currentPlayers = '",
".",
"print_r",
"(",
"$",
"currentPlayers",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"maxPlayers",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'maxPlayers = '",
".",
"print_r",
"(",
"$",
"maxPlayers",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_float",
"(",
"$",
"averageLevel",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'averageLevel = '",
".",
"print_r",
"(",
"$",
"averageLevel",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"isLobby",
",",
"$",
"currentPlayers",
",",
"$",
"maxPlayers",
",",
"$",
"averageLevel",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Declare if the server is a lobby, the number and maximum number of players currently managed by it, and the average level of the players.
Only available to Admin.
@param bool $isLobby
@param int $currentPlayers
@param int $maxPlayers
@param float $averageLevel
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Declare",
"if",
"the",
"server",
"is",
"a",
"lobby",
"the",
"number",
"and",
"maximum",
"number",
"of",
"players",
"currently",
"managed",
"by",
"it",
"and",
"the",
"average",
"level",
"of",
"the",
"players",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1847-L1863
|
234,339
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getLobbyInfo
|
function getLobbyInfo($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('LobbyInfo'));
}
return Structures\LobbyInfo::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getLobbyInfo($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('LobbyInfo'));
}
return Structures\LobbyInfo::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getLobbyInfo",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'LobbyInfo'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"LobbyInfo",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Get whether the server if a lobby, the number and maximum number of players currently managed by it.
@param bool $multicall
@return Structures\LobbyInfo
|
[
"Get",
"whether",
"the",
"server",
"if",
"a",
"lobby",
"the",
"number",
"and",
"maximum",
"number",
"of",
"players",
"currently",
"managed",
"by",
"it",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1870-L1876
|
234,340
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.customizeQuitDialog
|
function customizeQuitDialog($manialink, $sendToServer = '', $askFavorite = true, $quitButtonDelay = 0, $multicall = false)
{
if (!is_string($manialink)) {
throw new InvalidArgumentException('manialink = ' . print_r($manialink, true));
}
if (!is_string($sendToServer)) {
throw new InvalidArgumentException('sendToServer = ' . print_r($sendToServer, true));
}
if (!is_bool($askFavorite)) {
throw new InvalidArgumentException('askFavorite = ' . print_r($askFavorite, true));
}
if (!is_int($quitButtonDelay)) {
throw new InvalidArgumentException('quitButtonDelay = ' . print_r($quitButtonDelay, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($manialink, $sendToServer, $askFavorite, $quitButtonDelay), $multicall);
}
|
php
|
function customizeQuitDialog($manialink, $sendToServer = '', $askFavorite = true, $quitButtonDelay = 0, $multicall = false)
{
if (!is_string($manialink)) {
throw new InvalidArgumentException('manialink = ' . print_r($manialink, true));
}
if (!is_string($sendToServer)) {
throw new InvalidArgumentException('sendToServer = ' . print_r($sendToServer, true));
}
if (!is_bool($askFavorite)) {
throw new InvalidArgumentException('askFavorite = ' . print_r($askFavorite, true));
}
if (!is_int($quitButtonDelay)) {
throw new InvalidArgumentException('quitButtonDelay = ' . print_r($quitButtonDelay, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($manialink, $sendToServer, $askFavorite, $quitButtonDelay), $multicall);
}
|
[
"function",
"customizeQuitDialog",
"(",
"$",
"manialink",
",",
"$",
"sendToServer",
"=",
"''",
",",
"$",
"askFavorite",
"=",
"true",
",",
"$",
"quitButtonDelay",
"=",
"0",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"manialink",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'manialink = '",
".",
"print_r",
"(",
"$",
"manialink",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"sendToServer",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'sendToServer = '",
".",
"print_r",
"(",
"$",
"sendToServer",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"askFavorite",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'askFavorite = '",
".",
"print_r",
"(",
"$",
"askFavorite",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"quitButtonDelay",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'quitButtonDelay = '",
".",
"print_r",
"(",
"$",
"quitButtonDelay",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"manialink",
",",
"$",
"sendToServer",
",",
"$",
"askFavorite",
",",
"$",
"quitButtonDelay",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Customize the clients 'leave server' dialog box.
Only available to Admin.
@param string $manialink
@param string $sendToServer Server URL, eg. '#qjoin=login@title'
@param bool $askFavorite
@param int $quitButtonDelay In milliseconds
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Customize",
"the",
"clients",
"leave",
"server",
"dialog",
"box",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1889-L1905
|
234,341
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.keepPlayerSlots
|
function keepPlayerSlots($keep = true, $multicall = false)
{
if (!is_bool($keep)) {
throw new InvalidArgumentException('keep = ' . print_r($keep, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($keep), $multicall);
}
|
php
|
function keepPlayerSlots($keep = true, $multicall = false)
{
if (!is_bool($keep)) {
throw new InvalidArgumentException('keep = ' . print_r($keep, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($keep), $multicall);
}
|
[
"function",
"keepPlayerSlots",
"(",
"$",
"keep",
"=",
"true",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"keep",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'keep = '",
".",
"print_r",
"(",
"$",
"keep",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"keep",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set whether, when a player is switching to spectator, the server should still consider him a player and keep his player slot, or not.
Only available to Admin.
@param bool $keep
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"whether",
"when",
"a",
"player",
"is",
"switching",
"to",
"spectator",
"the",
"server",
"should",
"still",
"consider",
"him",
"a",
"player",
"and",
"keep",
"his",
"player",
"slot",
"or",
"not",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1915-L1922
|
234,342
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.enableP2PDownload
|
function enableP2PDownload($enable = true, $multicall = false)
{
if (!is_bool($enable)) {
throw new InvalidArgumentException('enable = ' . print_r($enable, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($enable), $multicall);
}
|
php
|
function enableP2PDownload($enable = true, $multicall = false)
{
if (!is_bool($enable)) {
throw new InvalidArgumentException('enable = ' . print_r($enable, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($enable), $multicall);
}
|
[
"function",
"enableP2PDownload",
"(",
"$",
"enable",
"=",
"true",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"enable",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'enable = '",
".",
"print_r",
"(",
"$",
"enable",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"enable",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Enable or disable peer-to-peer download for server.
Only available to Admin.
@param bool $enable
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Enable",
"or",
"disable",
"peer",
"-",
"to",
"-",
"peer",
"download",
"for",
"server",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1969-L1976
|
234,343
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.allowMapDownload
|
function allowMapDownload($allow = true, $multicall = false)
{
if (!is_bool($allow)) {
throw new InvalidArgumentException('allow = ' . print_r($allow, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($allow), $multicall);
}
|
php
|
function allowMapDownload($allow = true, $multicall = false)
{
if (!is_bool($allow)) {
throw new InvalidArgumentException('allow = ' . print_r($allow, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($allow), $multicall);
}
|
[
"function",
"allowMapDownload",
"(",
"$",
"allow",
"=",
"true",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"allow",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'allow = '",
".",
"print_r",
"(",
"$",
"allow",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"allow",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Allow clients to download maps from the server.
Only available to Admin.
@param bool $allow
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Allow",
"clients",
"to",
"download",
"maps",
"from",
"the",
"server",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L1996-L2003
|
234,344
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.gameDataDirectory
|
function gameDataDirectory($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), array($this, 'stripBom'));
}
return $this->stripBom($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function gameDataDirectory($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), array($this, 'stripBom'));
}
return $this->stripBom($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"gameDataDirectory",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"array",
"(",
"$",
"this",
",",
"'stripBom'",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"stripBom",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns the path of the game datas directory.
Only available to Admin.
@param bool $multicall
@return string
|
[
"Returns",
"the",
"path",
"of",
"the",
"game",
"datas",
"directory",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2021-L2027
|
234,345
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getMapsDirectory
|
function getMapsDirectory($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), array($this, 'stripBom'));
}
return $this->stripBom($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getMapsDirectory($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), array($this, 'stripBom'));
}
return $this->stripBom($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getMapsDirectory",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"array",
"(",
"$",
"this",
",",
"'stripBom'",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"stripBom",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns the path of the maps directory.
Only available to Admin.
@param bool $multicall
@return string
|
[
"Returns",
"the",
"path",
"of",
"the",
"maps",
"directory",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2035-L2041
|
234,346
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getSkinsDirectory
|
function getSkinsDirectory($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), array($this, 'stripBom'));
}
return $this->stripBom($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getSkinsDirectory($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), array($this, 'stripBom'));
}
return $this->stripBom($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getSkinsDirectory",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"array",
"(",
"$",
"this",
",",
"'stripBom'",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"stripBom",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns the path of the skins directory.
Only available to Admin.
@param bool $multicall
@return string
|
[
"Returns",
"the",
"path",
"of",
"the",
"skins",
"directory",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2049-L2055
|
234,347
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getTeamInfo
|
function getTeamInfo($team, $multicall = false)
{
if (!is_int($team) || $team < 0 || $team > 2) {
throw new InvalidArgumentException('team = ' . print_r($team, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($team), $this->structHandler('Team'));
}
return Structures\Team::fromArray($this->execute(ucfirst(__FUNCTION__), array($team)));
}
|
php
|
function getTeamInfo($team, $multicall = false)
{
if (!is_int($team) || $team < 0 || $team > 2) {
throw new InvalidArgumentException('team = ' . print_r($team, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($team), $this->structHandler('Team'));
}
return Structures\Team::fromArray($this->execute(ucfirst(__FUNCTION__), array($team)));
}
|
[
"function",
"getTeamInfo",
"(",
"$",
"team",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"team",
")",
"||",
"$",
"team",
"<",
"0",
"||",
"$",
"team",
">",
"2",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'team = '",
".",
"print_r",
"(",
"$",
"team",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"team",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'Team'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"Team",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"team",
")",
")",
")",
";",
"}"
] |
Return info for a given team.
Only available to Admin.
@param int $team 0: no clan, 1 or 2
@param bool $multicall
@return Structures\Team
@throws InvalidArgumentException
|
[
"Return",
"info",
"for",
"a",
"given",
"team",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2103-L2113
|
234,348
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setForcedClubLinks
|
function setForcedClubLinks($team1, $team2, $multicall = false)
{
if (!is_string($team1)) {
throw new InvalidArgumentException('team1 = ' . print_r($team1, true));
}
if (!is_string($team2)) {
throw new InvalidArgumentException('team2 = ' . print_r($team2, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($team1, $team2), $multicall);
}
|
php
|
function setForcedClubLinks($team1, $team2, $multicall = false)
{
if (!is_string($team1)) {
throw new InvalidArgumentException('team1 = ' . print_r($team1, true));
}
if (!is_string($team2)) {
throw new InvalidArgumentException('team2 = ' . print_r($team2, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($team1, $team2), $multicall);
}
|
[
"function",
"setForcedClubLinks",
"(",
"$",
"team1",
",",
"$",
"team2",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"team1",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'team1 = '",
".",
"print_r",
"(",
"$",
"team1",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"team2",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'team2 = '",
".",
"print_r",
"(",
"$",
"team2",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"team1",
",",
"$",
"team2",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set the clublinks to use for the two teams.
Only available to Admin.
@param string $team1
@param string $team2
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"the",
"clublinks",
"to",
"use",
"for",
"the",
"two",
"teams",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2124-L2134
|
234,349
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getDemoTokenInfosForPlayer
|
function getDemoTokenInfosForPlayer($player, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($login), $this->structHandler('TokenInfos'));
}
return Structures\TokenInfos::fromArray($this->execute(ucfirst(__FUNCTION__), array($login)));
}
|
php
|
function getDemoTokenInfosForPlayer($player, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($login), $this->structHandler('TokenInfos'));
}
return Structures\TokenInfos::fromArray($this->execute(ucfirst(__FUNCTION__), array($login)));
}
|
[
"function",
"getDemoTokenInfosForPlayer",
"(",
"$",
"player",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"login",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"player",
")",
";",
"if",
"(",
"$",
"login",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'player = '",
".",
"print_r",
"(",
"$",
"player",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"login",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'TokenInfos'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"TokenInfos",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"login",
")",
")",
")",
";",
"}"
] |
Returns the token infos for a player.
@param mixed $player Login or player object
@param bool $multicall
@return Structures\TokenInfos
@throws InvalidArgumentException
|
[
"Returns",
"the",
"token",
"infos",
"for",
"a",
"player",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2181-L2192
|
234,350
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.saveBestGhostsReplay
|
function saveBestGhostsReplay($player = null, $filename = '', $multicall = false)
{
$login = $this->getLogin($player, true);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if (!is_string($filename)) {
throw new InvalidArgumentException('filename = ' . print_r($filename, true));
}
$filename = $this->secureUtf8($filename);
return $this->execute(ucfirst(__FUNCTION__), array($login, $filename), $multicall);
}
|
php
|
function saveBestGhostsReplay($player = null, $filename = '', $multicall = false)
{
$login = $this->getLogin($player, true);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if (!is_string($filename)) {
throw new InvalidArgumentException('filename = ' . print_r($filename, true));
}
$filename = $this->secureUtf8($filename);
return $this->execute(ucfirst(__FUNCTION__), array($login, $filename), $multicall);
}
|
[
"function",
"saveBestGhostsReplay",
"(",
"$",
"player",
"=",
"null",
",",
"$",
"filename",
"=",
"''",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"login",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"player",
",",
"true",
")",
";",
"if",
"(",
"$",
"login",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'player = '",
".",
"print_r",
"(",
"$",
"player",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"filename",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'filename = '",
".",
"print_r",
"(",
"$",
"filename",
",",
"true",
")",
")",
";",
"}",
"$",
"filename",
"=",
"$",
"this",
"->",
"secureUtf8",
"(",
"$",
"filename",
")",
";",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"login",
",",
"$",
"filename",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Saves a replay with the ghost of all the players' best race.
Only available to Admin.
@param mixed $player Login or player object; empty for all
@param string $filename Empty for automatic filename
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Saves",
"a",
"replay",
"with",
"the",
"ghost",
"of",
"all",
"the",
"players",
"best",
"race",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2329-L2341
|
234,351
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getValidationReplay
|
function getValidationReplay($player, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($login), function ($v) {
return $v->scalar;
});
}
return $this->execute(ucfirst(__FUNCTION__), array($login))->scalar;
}
|
php
|
function getValidationReplay($player, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($login), function ($v) {
return $v->scalar;
});
}
return $this->execute(ucfirst(__FUNCTION__), array($login))->scalar;
}
|
[
"function",
"getValidationReplay",
"(",
"$",
"player",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"login",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"player",
")",
";",
"if",
"(",
"$",
"login",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'player = '",
".",
"print_r",
"(",
"$",
"player",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"login",
")",
",",
"function",
"(",
"$",
"v",
")",
"{",
"return",
"$",
"v",
"->",
"scalar",
";",
"}",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"login",
")",
")",
"->",
"scalar",
";",
"}"
] |
Returns a replay containing the data needed to validate the current best time of the player.
@param mixed $player Login or player object
@param bool $multicall
@return string
@throws InvalidArgumentException
|
[
"Returns",
"a",
"replay",
"containing",
"the",
"data",
"needed",
"to",
"validate",
"the",
"current",
"best",
"time",
"of",
"the",
"player",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2350-L2363
|
234,352
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setLadderMode
|
function setLadderMode($mode, $multicall = false)
{
if ($mode !== 0 && $mode !== 1) {
throw new InvalidArgumentException('mode = ' . print_r($mode, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($mode), $multicall);
}
|
php
|
function setLadderMode($mode, $multicall = false)
{
if ($mode !== 0 && $mode !== 1) {
throw new InvalidArgumentException('mode = ' . print_r($mode, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($mode), $multicall);
}
|
[
"function",
"setLadderMode",
"(",
"$",
"mode",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"mode",
"!==",
"0",
"&&",
"$",
"mode",
"!==",
"1",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'mode = '",
".",
"print_r",
"(",
"$",
"mode",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"mode",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new ladder mode.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $mode 0: disabled, 1: forced
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"ladder",
"mode",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2374-L2381
|
234,353
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getLadderServerLimits
|
function getLadderServerLimits($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('LadderLimits'));
}
return Structures\LadderLimits::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getLadderServerLimits($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('LadderLimits'));
}
return Structures\LadderLimits::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getLadderServerLimits",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'LadderLimits'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"LadderLimits",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Get the ladder points limit for the players allowed on this server.
@param bool $multicall
@return Structures\LadderLimits
|
[
"Get",
"the",
"ladder",
"points",
"limit",
"for",
"the",
"players",
"allowed",
"on",
"this",
"server",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2398-L2404
|
234,354
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setVehicleNetQuality
|
function setVehicleNetQuality($quality, $multicall = false)
{
if ($quality !== 0 && $quality !== 1) {
throw new InvalidArgumentException('quality = ' . print_r($quality, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($quality), $multicall);
}
|
php
|
function setVehicleNetQuality($quality, $multicall = false)
{
if ($quality !== 0 && $quality !== 1) {
throw new InvalidArgumentException('quality = ' . print_r($quality, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($quality), $multicall);
}
|
[
"function",
"setVehicleNetQuality",
"(",
"$",
"quality",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"quality",
"!==",
"0",
"&&",
"$",
"quality",
"!==",
"1",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'quality = '",
".",
"print_r",
"(",
"$",
"quality",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"quality",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set the network vehicle quality.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $quality 0: fast, 1: high
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"the",
"network",
"vehicle",
"quality",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2415-L2422
|
234,355
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getServerOptions
|
function getServerOptions($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('ServerOptions'));
}
return Structures\ServerOptions::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getServerOptions($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('ServerOptions'));
}
return Structures\ServerOptions::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getServerOptions",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'ServerOptions'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"ServerOptions",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns a struct containing the server options
@param bool $multicall
@return Structures\ServerOptions
|
[
"Returns",
"a",
"struct",
"containing",
"the",
"server",
"options"
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2462-L2468
|
234,356
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setServerPackMask
|
function setServerPackMask($packMask, $multicall = false)
{
if (!is_string($packMask)) {
throw new InvalidArgumentException('packMask = ' . print_r($packMask, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($packMask), $multicall);
}
|
php
|
function setServerPackMask($packMask, $multicall = false)
{
if (!is_string($packMask)) {
throw new InvalidArgumentException('packMask = ' . print_r($packMask, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($packMask), $multicall);
}
|
[
"function",
"setServerPackMask",
"(",
"$",
"packMask",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"packMask",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'packMask = '",
".",
"print_r",
"(",
"$",
"packMask",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"packMask",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Defines the packmask of the server.
Only maps matching the packmask will be allowed on the server, so that player connecting to it know what to expect.
Only available when the server is stopped.
Only available in 2011-08-01 API version.
Only available to Admin.
@param string $packMask
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Defines",
"the",
"packmask",
"of",
"the",
"server",
".",
"Only",
"maps",
"matching",
"the",
"packmask",
"will",
"be",
"allowed",
"on",
"the",
"server",
"so",
"that",
"player",
"connecting",
"to",
"it",
"know",
"what",
"to",
"expect",
".",
"Only",
"available",
"when",
"the",
"server",
"is",
"stopped",
".",
"Only",
"available",
"in",
"2011",
"-",
"08",
"-",
"01",
"API",
"version",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2508-L2515
|
234,357
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setForcedMods
|
function setForcedMods($override, $mods, $multicall = false)
{
if (!is_bool($override)) {
throw new InvalidArgumentException('override = ' . print_r($override, true));
}
if (is_array($mods)) {
foreach ($mods as $i => &$mod) {
if (!($mod instanceof Structures\Mod)) {
throw new InvalidArgumentException('mods[' . $i . '] = ' . print_r($mod, true));
}
$mod = $mod->toArray();
}
} elseif ($mods instanceof Structures\Mod) {
$mods = array($mods->toArray());
} else {
throw new InvalidArgumentException('mods = ' . print_r($mods, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($override, $mods), $multicall);
}
|
php
|
function setForcedMods($override, $mods, $multicall = false)
{
if (!is_bool($override)) {
throw new InvalidArgumentException('override = ' . print_r($override, true));
}
if (is_array($mods)) {
foreach ($mods as $i => &$mod) {
if (!($mod instanceof Structures\Mod)) {
throw new InvalidArgumentException('mods[' . $i . '] = ' . print_r($mod, true));
}
$mod = $mod->toArray();
}
} elseif ($mods instanceof Structures\Mod) {
$mods = array($mods->toArray());
} else {
throw new InvalidArgumentException('mods = ' . print_r($mods, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($override, $mods), $multicall);
}
|
[
"function",
"setForcedMods",
"(",
"$",
"override",
",",
"$",
"mods",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"override",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'override = '",
".",
"print_r",
"(",
"$",
"override",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"is_array",
"(",
"$",
"mods",
")",
")",
"{",
"foreach",
"(",
"$",
"mods",
"as",
"$",
"i",
"=>",
"&",
"$",
"mod",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"mod",
"instanceof",
"Structures",
"\\",
"Mod",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'mods['",
".",
"$",
"i",
".",
"'] = '",
".",
"print_r",
"(",
"$",
"mod",
",",
"true",
")",
")",
";",
"}",
"$",
"mod",
"=",
"$",
"mod",
"->",
"toArray",
"(",
")",
";",
"}",
"}",
"elseif",
"(",
"$",
"mods",
"instanceof",
"Structures",
"\\",
"Mod",
")",
"{",
"$",
"mods",
"=",
"array",
"(",
"$",
"mods",
"->",
"toArray",
"(",
")",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'mods = '",
".",
"print_r",
"(",
"$",
"mods",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"override",
",",
"$",
"mods",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set the mods to apply on the clients.
Only available to Admin.
Requires a map restart to be taken into account.
@param bool $override If true, even the maps with a mod will be overridden by the server setting
@param Structures\Mod|Structures\Mod[] $mods Array of structures [{string Env, string Url}, ...]
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"the",
"mods",
"to",
"apply",
"on",
"the",
"clients",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2538-L2557
|
234,358
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getForcedMods
|
function getForcedMods($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), function ($v) {
$v['Mods'] = Structures\Mod::fromArrayOfArray($v['Mods']);
return $v;
});
}
$result = $this->execute(ucfirst(__FUNCTION__));
$result['Mods'] = Structures\Mod::fromArrayOfArray($result['Mods']);
return $result;
}
|
php
|
function getForcedMods($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), function ($v) {
$v['Mods'] = Structures\Mod::fromArrayOfArray($v['Mods']);
return $v;
});
}
$result = $this->execute(ucfirst(__FUNCTION__));
$result['Mods'] = Structures\Mod::fromArrayOfArray($result['Mods']);
return $result;
}
|
[
"function",
"getForcedMods",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"function",
"(",
"$",
"v",
")",
"{",
"$",
"v",
"[",
"'Mods'",
"]",
"=",
"Structures",
"\\",
"Mod",
"::",
"fromArrayOfArray",
"(",
"$",
"v",
"[",
"'Mods'",
"]",
")",
";",
"return",
"$",
"v",
";",
"}",
")",
";",
"}",
"$",
"result",
"=",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
";",
"$",
"result",
"[",
"'Mods'",
"]",
"=",
"Structures",
"\\",
"Mod",
"::",
"fromArrayOfArray",
"(",
"$",
"result",
"[",
"'Mods'",
"]",
")",
";",
"return",
"$",
"result",
";",
"}"
] |
Get the mods settings.
@param bool $multicall
@return array {bool Override, Structures\Mod[] Mods}
|
[
"Get",
"the",
"mods",
"settings",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2564-L2575
|
234,359
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setForcedMusic
|
function setForcedMusic($override, $music, $multicall = false)
{
if (!is_bool($override)) {
throw new InvalidArgumentException('override = ' . print_r($override, true));
}
if (!is_string($music)) {
throw new InvalidArgumentException('music = ' . print_r($music, true));
}
if (!preg_match('~^.+?://~', $music)) {
$music = $this->secureUtf8($music);
}
return $this->execute(ucfirst(__FUNCTION__), array($override, $music), $multicall);
}
|
php
|
function setForcedMusic($override, $music, $multicall = false)
{
if (!is_bool($override)) {
throw new InvalidArgumentException('override = ' . print_r($override, true));
}
if (!is_string($music)) {
throw new InvalidArgumentException('music = ' . print_r($music, true));
}
if (!preg_match('~^.+?://~', $music)) {
$music = $this->secureUtf8($music);
}
return $this->execute(ucfirst(__FUNCTION__), array($override, $music), $multicall);
}
|
[
"function",
"setForcedMusic",
"(",
"$",
"override",
",",
"$",
"music",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"override",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'override = '",
".",
"print_r",
"(",
"$",
"override",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"music",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'music = '",
".",
"print_r",
"(",
"$",
"music",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"preg_match",
"(",
"'~^.+?://~'",
",",
"$",
"music",
")",
")",
"{",
"$",
"music",
"=",
"$",
"this",
"->",
"secureUtf8",
"(",
"$",
"music",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"override",
",",
"$",
"music",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set the music to play on the clients.
Only available to Admin.
Requires a map restart to be taken into account.
@param bool $override If true, even the maps with a custom music will be overridden by the server setting
@param string $music Url or filename relative to the GameData path
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"the",
"music",
"to",
"play",
"on",
"the",
"clients",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2587-L2600
|
234,360
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getForcedMusic
|
function getForcedMusic($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Music'));
}
return Structures\Music::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getForcedMusic($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Music'));
}
return Structures\Music::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getForcedMusic",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'Music'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"Music",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Get the music setting.
@param bool $multicall
@return Structures\Music
|
[
"Get",
"the",
"music",
"setting",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2607-L2613
|
234,361
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setForcedSkins
|
function setForcedSkins($skins, $multicall = false)
{
if (is_array($skins)) {
foreach ($skins as $i => &$skin) {
if (!($skin instanceof Structures\ForcedSkin)) {
throw new InvalidArgumentException('skins[' . $i . '] = ' . print_r($skin, true));
}
$skin = $skin->toArray();
}
} elseif ($skins instanceof Structures\ForcedSkin) {
$skins = array($skins->toArray());
} else {
throw new InvalidArgumentException('skins = ' . print_r($skins, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($skins), $multicall);
}
|
php
|
function setForcedSkins($skins, $multicall = false)
{
if (is_array($skins)) {
foreach ($skins as $i => &$skin) {
if (!($skin instanceof Structures\ForcedSkin)) {
throw new InvalidArgumentException('skins[' . $i . '] = ' . print_r($skin, true));
}
$skin = $skin->toArray();
}
} elseif ($skins instanceof Structures\ForcedSkin) {
$skins = array($skins->toArray());
} else {
throw new InvalidArgumentException('skins = ' . print_r($skins, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($skins), $multicall);
}
|
[
"function",
"setForcedSkins",
"(",
"$",
"skins",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"skins",
")",
")",
"{",
"foreach",
"(",
"$",
"skins",
"as",
"$",
"i",
"=>",
"&",
"$",
"skin",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"skin",
"instanceof",
"Structures",
"\\",
"ForcedSkin",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'skins['",
".",
"$",
"i",
".",
"'] = '",
".",
"print_r",
"(",
"$",
"skin",
",",
"true",
")",
")",
";",
"}",
"$",
"skin",
"=",
"$",
"skin",
"->",
"toArray",
"(",
")",
";",
"}",
"}",
"elseif",
"(",
"$",
"skins",
"instanceof",
"Structures",
"\\",
"ForcedSkin",
")",
"{",
"$",
"skins",
"=",
"array",
"(",
"$",
"skins",
"->",
"toArray",
"(",
")",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'skins = '",
".",
"print_r",
"(",
"$",
"skins",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"skins",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Defines a list of remappings for player skins.
Will only affect players connecting after the value is set.
Only available to Admin.
@param Structures\ForcedSkin|Structures\ForcedSkin[] $skins List of structs {Orig, Name, Checksum, Url}:
- Orig is the name of the skin to remap, or '*' for any other
- Name, Checksum, Url define the skin to use (you may set value '' for any of those, all 3 null means same as Orig).
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Defines",
"a",
"list",
"of",
"remappings",
"for",
"player",
"skins",
".",
"Will",
"only",
"affect",
"players",
"connecting",
"after",
"the",
"value",
"is",
"set",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2626-L2642
|
234,362
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getForcedSkins
|
function getForcedSkins($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('ForcedSkin', true));
}
return Structures\ForcedSkin::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getForcedSkins($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('ForcedSkin', true));
}
return Structures\ForcedSkin::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getForcedSkins",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'ForcedSkin'",
",",
"true",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"ForcedSkin",
"::",
"fromArrayOfArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Get the current forced skins.
@param bool $multicall
@return Structures\ForcedSkin[]
|
[
"Get",
"the",
"current",
"forced",
"skins",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2649-L2655
|
234,363
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setClientInputsMaxLatency
|
function setClientInputsMaxLatency($latency, $multicall = false)
{
if (!is_int($latency)) {
throw new InvalidArgumentException('latency = ' . print_r($latency, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($latency), $multicall);
}
|
php
|
function setClientInputsMaxLatency($latency, $multicall = false)
{
if (!is_int($latency)) {
throw new InvalidArgumentException('latency = ' . print_r($latency, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($latency), $multicall);
}
|
[
"function",
"setClientInputsMaxLatency",
"(",
"$",
"latency",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"latency",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'latency = '",
".",
"print_r",
"(",
"$",
"latency",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"latency",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set the maximum time the server must wait for inputs from the clients before dropping data, or '0' for auto-adaptation.
Only used by ShootMania.
Only available to Admin.
@param int $latency
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"the",
"maximum",
"time",
"the",
"server",
"must",
"wait",
"for",
"inputs",
"from",
"the",
"clients",
"before",
"dropping",
"data",
"or",
"0",
"for",
"auto",
"-",
"adaptation",
".",
"Only",
"used",
"by",
"ShootMania",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2759-L2766
|
234,364
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setModeScriptText
|
function setModeScriptText($script, $multicall = false)
{
if (!is_string($script)) {
throw new InvalidArgumentException('script = ' . print_r($script, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($script), $multicall);
}
|
php
|
function setModeScriptText($script, $multicall = false)
{
if (!is_string($script)) {
throw new InvalidArgumentException('script = ' . print_r($script, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($script), $multicall);
}
|
[
"function",
"setModeScriptText",
"(",
"$",
"script",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"script",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'script = '",
".",
"print_r",
"(",
"$",
"script",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"script",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set the mode script and restart.
Only available to Admin.
@param string $script
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"the",
"mode",
"script",
"and",
"restart",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2824-L2831
|
234,365
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getModeScriptInfo
|
function getModeScriptInfo($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('ScriptInfo'));
}
return Structures\ScriptInfo::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getModeScriptInfo($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('ScriptInfo'));
}
return Structures\ScriptInfo::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getModeScriptInfo",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'ScriptInfo'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"ScriptInfo",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns the description of the current mode script.
@param bool $multicall
@return Structures\ScriptInfo
|
[
"Returns",
"the",
"description",
"of",
"the",
"current",
"mode",
"script",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2838-L2844
|
234,366
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setModeScriptSettings
|
function setModeScriptSettings($settings, $multicall = false)
{
if (!is_array($settings) || !$settings) {
throw new InvalidArgumentException('settings = ' . print_r($settings, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($settings), $multicall);
}
|
php
|
function setModeScriptSettings($settings, $multicall = false)
{
if (!is_array($settings) || !$settings) {
throw new InvalidArgumentException('settings = ' . print_r($settings, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($settings), $multicall);
}
|
[
"function",
"setModeScriptSettings",
"(",
"$",
"settings",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"settings",
")",
"||",
"!",
"$",
"settings",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'settings = '",
".",
"print_r",
"(",
"$",
"settings",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"settings",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Change the settings of the mode script.
Only available to Admin.
@param mixed[] $settings {mixed <setting name>, ...}
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Change",
"the",
"settings",
"of",
"the",
"mode",
"script",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2864-L2871
|
234,367
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.sendModeScriptCommands
|
function sendModeScriptCommands($commands, $multicall = false)
{
if (!is_array($commands) || !$commands) {
throw new InvalidArgumentException('commands = ' . print_r($commands, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($commands), $multicall);
}
|
php
|
function sendModeScriptCommands($commands, $multicall = false)
{
if (!is_array($commands) || !$commands) {
throw new InvalidArgumentException('commands = ' . print_r($commands, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($commands), $multicall);
}
|
[
"function",
"sendModeScriptCommands",
"(",
"$",
"commands",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"commands",
")",
"||",
"!",
"$",
"commands",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'commands = '",
".",
"print_r",
"(",
"$",
"commands",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"commands",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Send commands to the mode script.
Only available to Admin.
@param mixed[] $commands {mixed <command name>, ...}
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Send",
"commands",
"to",
"the",
"mode",
"script",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2881-L2888
|
234,368
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setModeScriptSettingsAndCommands
|
function setModeScriptSettingsAndCommands($settings, $commands, $multicall = false)
{
if (!is_array($settings) || !$settings) {
throw new InvalidArgumentException('settings = ' . print_r($settings, true));
}
if (!is_array($commands) || !$commands) {
throw new InvalidArgumentException('commands = ' . print_r($commands, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($settings, $commands), $multicall);
}
|
php
|
function setModeScriptSettingsAndCommands($settings, $commands, $multicall = false)
{
if (!is_array($settings) || !$settings) {
throw new InvalidArgumentException('settings = ' . print_r($settings, true));
}
if (!is_array($commands) || !$commands) {
throw new InvalidArgumentException('commands = ' . print_r($commands, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($settings, $commands), $multicall);
}
|
[
"function",
"setModeScriptSettingsAndCommands",
"(",
"$",
"settings",
",",
"$",
"commands",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"settings",
")",
"||",
"!",
"$",
"settings",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'settings = '",
".",
"print_r",
"(",
"$",
"settings",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_array",
"(",
"$",
"commands",
")",
"||",
"!",
"$",
"commands",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'commands = '",
".",
"print_r",
"(",
"$",
"commands",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"settings",
",",
"$",
"commands",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Change the settings and send commands to the mode script.
Only available to Admin.
@param mixed[] $settings {mixed <setting name>, ...}
@param mixed[] $commands {mixed <command name>, ...}
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Change",
"the",
"settings",
"and",
"send",
"commands",
"to",
"the",
"mode",
"script",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2899-L2909
|
234,369
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setModeScriptVariables
|
function setModeScriptVariables($variables, $multicall = false)
{
if (!is_array($variables) || !$variables) {
throw new InvalidArgumentException('variables = ' . print_r($variables, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($variables), $multicall);
}
|
php
|
function setModeScriptVariables($variables, $multicall = false)
{
if (!is_array($variables) || !$variables) {
throw new InvalidArgumentException('variables = ' . print_r($variables, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($variables), $multicall);
}
|
[
"function",
"setModeScriptVariables",
"(",
"$",
"variables",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"variables",
")",
"||",
"!",
"$",
"variables",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'variables = '",
".",
"print_r",
"(",
"$",
"variables",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"variables",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set the xml-rpc variables of the mode script.
Only available to Admin.
@param mixed[] $variables {mixed <variable name>, ...}
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"the",
"xml",
"-",
"rpc",
"variables",
"of",
"the",
"mode",
"script",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2929-L2936
|
234,370
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.triggerModeScriptEvent
|
function triggerModeScriptEvent($event, $params = '', $multicall = false)
{
if (!is_string($event)) {
throw new InvalidArgumentException('event name must be a string: event = ' . print_r($event, true));
}
if (is_string($params)) {
return $this->execute(ucfirst(__FUNCTION__), array($event, $params), $multicall);
}
if (is_array($params)) {
foreach ($params as $param) {
if (!is_string($param)) {
throw new InvalidArgumentException('argument must be a string: param = ' . print_r($param, true));
}
}
return $this->execute(ucfirst(__FUNCTION__) . 'Array', array($event, $params), $multicall);
}
// else
throw new InvalidArgumentException('argument must be string or string[]: params = ' . print_r($params, true));
}
|
php
|
function triggerModeScriptEvent($event, $params = '', $multicall = false)
{
if (!is_string($event)) {
throw new InvalidArgumentException('event name must be a string: event = ' . print_r($event, true));
}
if (is_string($params)) {
return $this->execute(ucfirst(__FUNCTION__), array($event, $params), $multicall);
}
if (is_array($params)) {
foreach ($params as $param) {
if (!is_string($param)) {
throw new InvalidArgumentException('argument must be a string: param = ' . print_r($param, true));
}
}
return $this->execute(ucfirst(__FUNCTION__) . 'Array', array($event, $params), $multicall);
}
// else
throw new InvalidArgumentException('argument must be string or string[]: params = ' . print_r($params, true));
}
|
[
"function",
"triggerModeScriptEvent",
"(",
"$",
"event",
",",
"$",
"params",
"=",
"''",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"event",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'event name must be a string: event = '",
".",
"print_r",
"(",
"$",
"event",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"is_string",
"(",
"$",
"params",
")",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"event",
",",
"$",
"params",
")",
",",
"$",
"multicall",
")",
";",
"}",
"if",
"(",
"is_array",
"(",
"$",
"params",
")",
")",
"{",
"foreach",
"(",
"$",
"params",
"as",
"$",
"param",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"param",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'argument must be a string: param = '",
".",
"print_r",
"(",
"$",
"param",
",",
"true",
")",
")",
";",
"}",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
".",
"'Array'",
",",
"array",
"(",
"$",
"event",
",",
"$",
"params",
")",
",",
"$",
"multicall",
")",
";",
"}",
"// else",
"throw",
"new",
"InvalidArgumentException",
"(",
"'argument must be string or string[]: params = '",
".",
"print_r",
"(",
"$",
"params",
",",
"true",
")",
")",
";",
"}"
] |
Send an event to the mode script.
Only available to Admin.
@param string $event
@param string|string[] $params
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Send",
"an",
"event",
"to",
"the",
"mode",
"script",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2956-L2977
|
234,371
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getScriptCloudVariables
|
function getScriptCloudVariables($type, $id, $multicall = false)
{
if (!is_string($type)) {
throw new InvalidArgumentException('type = ' . print_r($type, true));
}
if (!is_string($id)) {
throw new InvalidArgumentException('id = ' . print_r($id, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($type, $id), $multicall);
}
|
php
|
function getScriptCloudVariables($type, $id, $multicall = false)
{
if (!is_string($type)) {
throw new InvalidArgumentException('type = ' . print_r($type, true));
}
if (!is_string($id)) {
throw new InvalidArgumentException('id = ' . print_r($id, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($type, $id), $multicall);
}
|
[
"function",
"getScriptCloudVariables",
"(",
"$",
"type",
",",
"$",
"id",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"type",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'type = '",
".",
"print_r",
"(",
"$",
"type",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"id",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'id = '",
".",
"print_r",
"(",
"$",
"id",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"type",
",",
"$",
"id",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Get the script cloud variables of given object.
Only available to Admin.
@param string $type
@param string $id
@param bool $multicall
@return array {mixed <variable name>, ...}
@throws InvalidArgumentException
|
[
"Get",
"the",
"script",
"cloud",
"variables",
"of",
"given",
"object",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L2988-L2998
|
234,372
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setScriptCloudVariables
|
function setScriptCloudVariables($type, $id, $variables, $multicall = false)
{
if (!is_string($type)) {
throw new InvalidArgumentException('type = ' . print_r($type, true));
}
if (!is_string($id)) {
throw new InvalidArgumentException('id = ' . print_r($id, true));
}
if (!is_array($variables) || !$variables) {
throw new InvalidArgumentException('variables = ' . print_r($variables, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($type, $id, $variables), $multicall);
}
|
php
|
function setScriptCloudVariables($type, $id, $variables, $multicall = false)
{
if (!is_string($type)) {
throw new InvalidArgumentException('type = ' . print_r($type, true));
}
if (!is_string($id)) {
throw new InvalidArgumentException('id = ' . print_r($id, true));
}
if (!is_array($variables) || !$variables) {
throw new InvalidArgumentException('variables = ' . print_r($variables, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($type, $id, $variables), $multicall);
}
|
[
"function",
"setScriptCloudVariables",
"(",
"$",
"type",
",",
"$",
"id",
",",
"$",
"variables",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"type",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'type = '",
".",
"print_r",
"(",
"$",
"type",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"id",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'id = '",
".",
"print_r",
"(",
"$",
"id",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_array",
"(",
"$",
"variables",
")",
"||",
"!",
"$",
"variables",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'variables = '",
".",
"print_r",
"(",
"$",
"variables",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"type",
",",
"$",
"id",
",",
"$",
"variables",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set the script cloud variables of given object.
Only available to Admin.
@param string $type
@param string $id
@param mixed[] $variables {mixed <variable name>, ...}
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"the",
"script",
"cloud",
"variables",
"of",
"given",
"object",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3010-L3023
|
234,373
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.restartMap
|
function restartMap($dontClearCupScores = false, $multicall = false)
{
if (!is_bool($dontClearCupScores)) {
throw new InvalidArgumentException('dontClearCupScores = ' . print_r($dontClearCupScores, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($dontClearCupScores), $multicall);
}
|
php
|
function restartMap($dontClearCupScores = false, $multicall = false)
{
if (!is_bool($dontClearCupScores)) {
throw new InvalidArgumentException('dontClearCupScores = ' . print_r($dontClearCupScores, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($dontClearCupScores), $multicall);
}
|
[
"function",
"restartMap",
"(",
"$",
"dontClearCupScores",
"=",
"false",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"dontClearCupScores",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'dontClearCupScores = '",
".",
"print_r",
"(",
"$",
"dontClearCupScores",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"dontClearCupScores",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Restarts the map.
Only available to Admin.
@param bool $dontClearCupScores Only available in legacy cup mode
@param bool $multicall
@return bool
|
[
"Restarts",
"the",
"map",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3032-L3039
|
234,374
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setGameInfos
|
function setGameInfos($gameInfos, $multicall = false)
{
if (!($gameInfos instanceof Structures\GameInfos)) {
throw new InvalidArgumentException('gameInfos = ' . print_r($gameInfos, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($gameInfos->toArray()), $multicall);
}
|
php
|
function setGameInfos($gameInfos, $multicall = false)
{
if (!($gameInfos instanceof Structures\GameInfos)) {
throw new InvalidArgumentException('gameInfos = ' . print_r($gameInfos, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($gameInfos->toArray()), $multicall);
}
|
[
"function",
"setGameInfos",
"(",
"$",
"gameInfos",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"gameInfos",
"instanceof",
"Structures",
"\\",
"GameInfos",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'gameInfos = '",
".",
"print_r",
"(",
"$",
"gameInfos",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"gameInfos",
"->",
"toArray",
"(",
")",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set new game settings using the struct passed as parameters.
Only available to Admin.
Requires a map restart to be taken into account.
@param Structures\GameInfos $gameInfos
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"new",
"game",
"settings",
"using",
"the",
"struct",
"passed",
"as",
"parameters",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3099-L3106
|
234,375
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getCurrentGameInfo
|
function getCurrentGameInfo($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('GameInfos'));
}
return Structures\GameInfos::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getCurrentGameInfo($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('GameInfos'));
}
return Structures\GameInfos::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getCurrentGameInfo",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'GameInfos'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"GameInfos",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns a struct containing the current game settings.
@param bool $multicall
@return Structures\GameInfos
|
[
"Returns",
"a",
"struct",
"containing",
"the",
"current",
"game",
"settings",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3113-L3119
|
234,376
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getGameInfos
|
function getGameInfos($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('GameInfos', true));
}
return Structures\GameInfos::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getGameInfos($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('GameInfos', true));
}
return Structures\GameInfos::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getGameInfos",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'GameInfos'",
",",
"true",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"GameInfos",
"::",
"fromArrayOfArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns a struct containing two other structures, the first containing the current game settings and the second the game settings for next map.
@param bool $multicall
@return Structures\GameInfos[] {Structures\GameInfos CurrentGameInfos, Structures\GameInfos NextGameInfos}
|
[
"Returns",
"a",
"struct",
"containing",
"two",
"other",
"structures",
"the",
"first",
"containing",
"the",
"current",
"game",
"settings",
"and",
"the",
"second",
"the",
"game",
"settings",
"for",
"next",
"map",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3139-L3145
|
234,377
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setGameMode
|
function setGameMode($gameMode, $multicall = false)
{
if (!is_int($gameMode) || $gameMode < 0 || $gameMode > 6) {
throw new InvalidArgumentException('gameMode = ' . print_r($gameMode, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($gameMode), $multicall);
}
|
php
|
function setGameMode($gameMode, $multicall = false)
{
if (!is_int($gameMode) || $gameMode < 0 || $gameMode > 6) {
throw new InvalidArgumentException('gameMode = ' . print_r($gameMode, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($gameMode), $multicall);
}
|
[
"function",
"setGameMode",
"(",
"$",
"gameMode",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"gameMode",
")",
"||",
"$",
"gameMode",
"<",
"0",
"||",
"$",
"gameMode",
">",
"6",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'gameMode = '",
".",
"print_r",
"(",
"$",
"gameMode",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"gameMode",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new game mode.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $gameMode 0: Script, 1: Rounds, 2: TimeAttack, 3: Team, 4: Laps, 5: Cup, 6: Stunt
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"game",
"mode",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3156-L3163
|
234,378
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setAllWarmUpDuration
|
function setAllWarmUpDuration($duration, $multicall = false)
{
if (!is_int($duration)) {
throw new InvalidArgumentException('duration = ' . print_r($duration, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($duration), $multicall);
}
|
php
|
function setAllWarmUpDuration($duration, $multicall = false)
{
if (!is_int($duration)) {
throw new InvalidArgumentException('duration = ' . print_r($duration, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($duration), $multicall);
}
|
[
"function",
"setAllWarmUpDuration",
"(",
"$",
"duration",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"duration",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'duration = '",
".",
"print_r",
"(",
"$",
"duration",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"duration",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set whether to enable the automatic warm-up phase in all modes.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $duration 0: disable, number of rounds in rounds based modes, number of times the gold medal time otherwise
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"whether",
"to",
"enable",
"the",
"automatic",
"warm",
"-",
"up",
"phase",
"in",
"all",
"modes",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3239-L3246
|
234,379
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setForceShowAllOpponents
|
function setForceShowAllOpponents($opponents, $multicall = false)
{
if (!is_int($opponents)) {
throw new InvalidArgumentException('opponents = ' . print_r($opponents, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($opponents), $multicall);
}
|
php
|
function setForceShowAllOpponents($opponents, $multicall = false)
{
if (!is_int($opponents)) {
throw new InvalidArgumentException('opponents = ' . print_r($opponents, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($opponents), $multicall);
}
|
[
"function",
"setForceShowAllOpponents",
"(",
"$",
"opponents",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"opponents",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'opponents = '",
".",
"print_r",
"(",
"$",
"opponents",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"opponents",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set whether to override the players preferences and always display all opponents.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $opponents 0: no override, 1: show all, else: minimum number of opponents
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"whether",
"to",
"override",
"the",
"players",
"preferences",
"and",
"always",
"display",
"all",
"opponents",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3295-L3302
|
234,380
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setScriptName
|
function setScriptName($script, $multicall = false)
{
if (!is_string($script)) {
throw new InvalidArgumentException('script = ' . print_r($script, true));
}
$script = $this->secureUtf8($script);
return $this->execute(ucfirst(__FUNCTION__), array($script), $multicall);
}
|
php
|
function setScriptName($script, $multicall = false)
{
if (!is_string($script)) {
throw new InvalidArgumentException('script = ' . print_r($script, true));
}
$script = $this->secureUtf8($script);
return $this->execute(ucfirst(__FUNCTION__), array($script), $multicall);
}
|
[
"function",
"setScriptName",
"(",
"$",
"script",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"script",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'script = '",
".",
"print_r",
"(",
"$",
"script",
",",
"true",
")",
")",
";",
"}",
"$",
"script",
"=",
"$",
"this",
"->",
"secureUtf8",
"(",
"$",
"script",
")",
";",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"script",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new mode script name for script mode.
Only available to Admin.
Requires a map restart to be taken into account.
@param string $script
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"mode",
"script",
"name",
"for",
"script",
"mode",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3323-L3331
|
234,381
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getScriptName
|
function getScriptName($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), array($this, 'stripBom'));
}
return $this->stripBom($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getScriptName($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), array($this, 'stripBom'));
}
return $this->stripBom($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getScriptName",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"array",
"(",
"$",
"this",
",",
"'stripBom'",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"stripBom",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Get the current and next mode script name for script mode.
@param bool $multicall
@return string[] {string CurrentValue, string NextValue}
|
[
"Get",
"the",
"current",
"and",
"next",
"mode",
"script",
"name",
"for",
"script",
"mode",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3338-L3344
|
234,382
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setTimeAttackSynchStartPeriod
|
function setTimeAttackSynchStartPeriod($synch, $multicall = false)
{
if (!is_int($synch)) {
throw new InvalidArgumentException('synch = ' . print_r($synch, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($synch), $multicall);
}
|
php
|
function setTimeAttackSynchStartPeriod($synch, $multicall = false)
{
if (!is_int($synch)) {
throw new InvalidArgumentException('synch = ' . print_r($synch, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($synch), $multicall);
}
|
[
"function",
"setTimeAttackSynchStartPeriod",
"(",
"$",
"synch",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"synch",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'synch = '",
".",
"print_r",
"(",
"$",
"synch",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"synch",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new synchronized start period for legacy time attack mode.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $synch
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"synchronized",
"start",
"period",
"for",
"legacy",
"time",
"attack",
"mode",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3383-L3390
|
234,383
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setRoundForcedLaps
|
function setRoundForcedLaps($laps, $multicall = false)
{
if (!is_int($laps)) {
throw new InvalidArgumentException('laps = ' . print_r($laps, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($laps), $multicall);
}
|
php
|
function setRoundForcedLaps($laps, $multicall = false)
{
if (!is_int($laps)) {
throw new InvalidArgumentException('laps = ' . print_r($laps, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($laps), $multicall);
}
|
[
"function",
"setRoundForcedLaps",
"(",
"$",
"laps",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"laps",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'laps = '",
".",
"print_r",
"(",
"$",
"laps",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"laps",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new number of laps for legacy rounds mode.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $laps 0: map default
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"number",
"of",
"laps",
"for",
"legacy",
"rounds",
"mode",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3467-L3474
|
234,384
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setRoundCustomPoints
|
function setRoundCustomPoints($points, $relax = false, $multicall = false)
{
if (!is_array($points)) {
throw new InvalidArgumentException('points = ' . print_r($points, true));
}
if (!is_bool($relax)) {
throw new InvalidArgumentException('relax = ' . print_r($relax, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($points, $relax), $multicall);
}
|
php
|
function setRoundCustomPoints($points, $relax = false, $multicall = false)
{
if (!is_array($points)) {
throw new InvalidArgumentException('points = ' . print_r($points, true));
}
if (!is_bool($relax)) {
throw new InvalidArgumentException('relax = ' . print_r($relax, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($points, $relax), $multicall);
}
|
[
"function",
"setRoundCustomPoints",
"(",
"$",
"points",
",",
"$",
"relax",
"=",
"false",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"points",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'points = '",
".",
"print_r",
"(",
"$",
"points",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"relax",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'relax = '",
".",
"print_r",
"(",
"$",
"relax",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"points",
",",
"$",
"relax",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set the points used for the scores in legacy rounds mode.
Only available to Admin.
@param int[] $points Array of decreasing integers for the players from the first to last
@param bool $relax True to relax the constraint checking on the scores
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"the",
"points",
"used",
"for",
"the",
"scores",
"in",
"legacy",
"rounds",
"mode",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3523-L3533
|
234,385
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setMaxPointsTeam
|
function setMaxPointsTeam($max, $multicall = false)
{
if (!is_int($max)) {
throw new InvalidArgumentException('max = ' . print_r($max, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($max), $multicall);
}
|
php
|
function setMaxPointsTeam($max, $multicall = false)
{
if (!is_int($max)) {
throw new InvalidArgumentException('max = ' . print_r($max, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($max), $multicall);
}
|
[
"function",
"setMaxPointsTeam",
"(",
"$",
"max",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"max",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'max = '",
".",
"print_r",
"(",
"$",
"max",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"max",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set a new number of maximum points per round for team mode.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $max
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"a",
"new",
"number",
"of",
"maximum",
"points",
"per",
"round",
"for",
"team",
"mode",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3610-L3617
|
234,386
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setUseNewRulesTeam
|
function setUseNewRulesTeam($newRules, $multicall = false)
{
if (!is_bool($newRules)) {
throw new InvalidArgumentException('newRules = ' . print_r($newRules, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($newRules), $multicall);
}
|
php
|
function setUseNewRulesTeam($newRules, $multicall = false)
{
if (!is_bool($newRules)) {
throw new InvalidArgumentException('newRules = ' . print_r($newRules, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($newRules), $multicall);
}
|
[
"function",
"setUseNewRulesTeam",
"(",
"$",
"newRules",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"newRules",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'newRules = '",
".",
"print_r",
"(",
"$",
"newRules",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"newRules",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set if new rules are used for team mode.
Only available to Admin.
Requires a map restart to be taken into account.
@param bool $newRules
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"if",
"new",
"rules",
"are",
"used",
"for",
"team",
"mode",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3638-L3645
|
234,387
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setCupRoundsPerMap
|
function setCupRoundsPerMap($rounds, $multicall = false)
{
if (!is_int($rounds)) {
throw new InvalidArgumentException('rounds = ' . print_r($rounds, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($rounds), $multicall);
}
|
php
|
function setCupRoundsPerMap($rounds, $multicall = false)
{
if (!is_int($rounds)) {
throw new InvalidArgumentException('rounds = ' . print_r($rounds, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($rounds), $multicall);
}
|
[
"function",
"setCupRoundsPerMap",
"(",
"$",
"rounds",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"rounds",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'rounds = '",
".",
"print_r",
"(",
"$",
"rounds",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"rounds",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Sets the number of rounds before going to next map in Cup mode.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $rounds
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Sets",
"the",
"number",
"of",
"rounds",
"before",
"going",
"to",
"next",
"map",
"in",
"Cup",
"mode",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3694-L3701
|
234,388
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.setCupNbWinners
|
function setCupNbWinners($winners, $multicall = false)
{
if (!is_int($winners)) {
throw new InvalidArgumentException('winners = ' . print_r($winners, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($winners), $multicall);
}
|
php
|
function setCupNbWinners($winners, $multicall = false)
{
if (!is_int($winners)) {
throw new InvalidArgumentException('winners = ' . print_r($winners, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($winners), $multicall);
}
|
[
"function",
"setCupNbWinners",
"(",
"$",
"winners",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"winners",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'winners = '",
".",
"print_r",
"(",
"$",
"winners",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"winners",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set the number of winners to determine before the match is considered over.
Only available to Admin.
Requires a map restart to be taken into account.
@param int $winners
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Set",
"the",
"number",
"of",
"winners",
"to",
"determine",
"before",
"the",
"match",
"is",
"considered",
"over",
".",
"Only",
"available",
"to",
"Admin",
".",
"Requires",
"a",
"map",
"restart",
"to",
"be",
"taken",
"into",
"account",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3750-L3757
|
234,389
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getCurrentMapInfo
|
function getCurrentMapInfo($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Map'));
}
return Structures\Map::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getCurrentMapInfo($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Map'));
}
return Structures\Map::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getCurrentMapInfo",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'Map'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"Map",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns a struct containing the infos for the current map.
@param bool $multicall
@return Structures\Map
|
[
"Returns",
"a",
"struct",
"containing",
"the",
"infos",
"for",
"the",
"current",
"map",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3858-L3864
|
234,390
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getMapInfo
|
function getMapInfo($filename, $multicall = false)
{
if (!is_string($filename)) {
throw new InvalidArgumentException('filename = ' . print_r($filename, true));
}
$filename = $this->secureUtf8($filename);
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($filename), $this->structHandler('Map'));
}
return Structures\Map::fromArray($this->execute(ucfirst(__FUNCTION__), array($filename)));
}
|
php
|
function getMapInfo($filename, $multicall = false)
{
if (!is_string($filename)) {
throw new InvalidArgumentException('filename = ' . print_r($filename, true));
}
$filename = $this->secureUtf8($filename);
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($filename), $this->structHandler('Map'));
}
return Structures\Map::fromArray($this->execute(ucfirst(__FUNCTION__), array($filename)));
}
|
[
"function",
"getMapInfo",
"(",
"$",
"filename",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"filename",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'filename = '",
".",
"print_r",
"(",
"$",
"filename",
",",
"true",
")",
")",
";",
"}",
"$",
"filename",
"=",
"$",
"this",
"->",
"secureUtf8",
"(",
"$",
"filename",
")",
";",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"filename",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'Map'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"Map",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"filename",
")",
")",
")",
";",
"}"
] |
Returns a struct containing the infos for the map with the specified filename.
@param string $filename Relative to the Maps path
@param bool $multicall
@return Structures\Map
@throws InvalidArgumentException
|
[
"Returns",
"a",
"struct",
"containing",
"the",
"infos",
"for",
"the",
"map",
"with",
"the",
"specified",
"filename",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3886-L3897
|
234,391
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.checkMapForCurrentServerParams
|
function checkMapForCurrentServerParams($filename, $multicall = false)
{
if (!is_string($filename)) {
throw new InvalidArgumentException('filename = ' . print_r($filename, true));
}
$filename = $this->secureUtf8($filename);
return $this->execute(ucfirst(__FUNCTION__), array($filename), $multicall);
}
|
php
|
function checkMapForCurrentServerParams($filename, $multicall = false)
{
if (!is_string($filename)) {
throw new InvalidArgumentException('filename = ' . print_r($filename, true));
}
$filename = $this->secureUtf8($filename);
return $this->execute(ucfirst(__FUNCTION__), array($filename), $multicall);
}
|
[
"function",
"checkMapForCurrentServerParams",
"(",
"$",
"filename",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"filename",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'filename = '",
".",
"print_r",
"(",
"$",
"filename",
",",
"true",
")",
")",
";",
"}",
"$",
"filename",
"=",
"$",
"this",
"->",
"secureUtf8",
"(",
"$",
"filename",
")",
";",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"filename",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Returns a boolean if the map with the specified filename matches the current server settings.
@param string $filename Relative to the Maps path
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Returns",
"a",
"boolean",
"if",
"the",
"map",
"with",
"the",
"specified",
"filename",
"matches",
"the",
"current",
"server",
"settings",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3906-L3914
|
234,392
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getMapList
|
function getMapList($length = -1, $offset = 0, $multicall = false)
{
if (!is_int($length)) {
throw new InvalidArgumentException('length = ' . print_r($length, true));
}
if (!is_int($offset)) {
throw new InvalidArgumentException('offset = ' . print_r($offset, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($length, $offset), $this->structHandler('Map', true));
}
return Structures\Map::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset)));
}
|
php
|
function getMapList($length = -1, $offset = 0, $multicall = false)
{
if (!is_int($length)) {
throw new InvalidArgumentException('length = ' . print_r($length, true));
}
if (!is_int($offset)) {
throw new InvalidArgumentException('offset = ' . print_r($offset, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($length, $offset), $this->structHandler('Map', true));
}
return Structures\Map::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset)));
}
|
[
"function",
"getMapList",
"(",
"$",
"length",
"=",
"-",
"1",
",",
"$",
"offset",
"=",
"0",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"length",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'length = '",
".",
"print_r",
"(",
"$",
"length",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"offset",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'offset = '",
".",
"print_r",
"(",
"$",
"offset",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"length",
",",
"$",
"offset",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'Map'",
",",
"true",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"Map",
"::",
"fromArrayOfArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"length",
",",
"$",
"offset",
")",
")",
")",
";",
"}"
] |
Returns a list of maps among the current selection of the server.
@param int $length Maximum number of infos to be returned
@param int $offset Starting index in the list
@param bool $multicall
@return Structures\Map[]
@throws InvalidArgumentException
|
[
"Returns",
"a",
"list",
"of",
"maps",
"among",
"the",
"current",
"selection",
"of",
"the",
"server",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L3924-L3937
|
234,393
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.chooseNextMapList
|
function chooseNextMapList($filenames, $multicall = false)
{
if (!is_array($filenames)) {
throw new InvalidArgumentException('filenames = ' . print_r($filenames, true));
}
$filenames = $this->secureUtf8($filenames);
return $this->execute(ucfirst(__FUNCTION__), array($filenames), $multicall);
}
|
php
|
function chooseNextMapList($filenames, $multicall = false)
{
if (!is_array($filenames)) {
throw new InvalidArgumentException('filenames = ' . print_r($filenames, true));
}
$filenames = $this->secureUtf8($filenames);
return $this->execute(ucfirst(__FUNCTION__), array($filenames), $multicall);
}
|
[
"function",
"chooseNextMapList",
"(",
"$",
"filenames",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"filenames",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'filenames = '",
".",
"print_r",
"(",
"$",
"filenames",
",",
"true",
")",
")",
";",
"}",
"$",
"filenames",
"=",
"$",
"this",
"->",
"secureUtf8",
"(",
"$",
"filenames",
")",
";",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"filenames",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Set as next maps the list of maps with the specified filenames, if they are present in the selection.
Only available to Admin.
@param string[] $filenames Relative to the Maps path
@param bool $multicall
@return int Number of maps actually chosen
@throws InvalidArgumentException
|
[
"Set",
"as",
"next",
"maps",
"the",
"list",
"of",
"maps",
"with",
"the",
"specified",
"filenames",
"if",
"they",
"are",
"present",
"in",
"the",
"selection",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L4073-L4081
|
234,394
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getPlayerList
|
function getPlayerList($length = -1, $offset = 0, $compatibility = 1, $multicall = false)
{
if (!is_int($length)) {
throw new InvalidArgumentException('length = ' . print_r($length, true));
}
if (!is_int($offset)) {
throw new InvalidArgumentException('offset = ' . print_r($offset, true));
}
if (!is_int($compatibility) || $compatibility < 0 || $compatibility > 2) {
throw new InvalidArgumentException('compatibility = ' . print_r($compatibility, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($length, $offset, $compatibility), $this->structHandler('PlayerInfo', true));
}
return Structures\PlayerInfo::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset, $compatibility)));
}
|
php
|
function getPlayerList($length = -1, $offset = 0, $compatibility = 1, $multicall = false)
{
if (!is_int($length)) {
throw new InvalidArgumentException('length = ' . print_r($length, true));
}
if (!is_int($offset)) {
throw new InvalidArgumentException('offset = ' . print_r($offset, true));
}
if (!is_int($compatibility) || $compatibility < 0 || $compatibility > 2) {
throw new InvalidArgumentException('compatibility = ' . print_r($compatibility, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($length, $offset, $compatibility), $this->structHandler('PlayerInfo', true));
}
return Structures\PlayerInfo::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset, $compatibility)));
}
|
[
"function",
"getPlayerList",
"(",
"$",
"length",
"=",
"-",
"1",
",",
"$",
"offset",
"=",
"0",
",",
"$",
"compatibility",
"=",
"1",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"length",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'length = '",
".",
"print_r",
"(",
"$",
"length",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"offset",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'offset = '",
".",
"print_r",
"(",
"$",
"offset",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"compatibility",
")",
"||",
"$",
"compatibility",
"<",
"0",
"||",
"$",
"compatibility",
">",
"2",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'compatibility = '",
".",
"print_r",
"(",
"$",
"compatibility",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"length",
",",
"$",
"offset",
",",
"$",
"compatibility",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'PlayerInfo'",
",",
"true",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"PlayerInfo",
"::",
"fromArrayOfArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"length",
",",
"$",
"offset",
",",
"$",
"compatibility",
")",
")",
")",
";",
"}"
] |
Returns the list of players on the server.
@param int $length Maximum number of infos to be returned
@param int $offset Starting index in the list
@param int $compatibility 0: united, 1: forever, 2: forever including servers
@param bool $multicall
@return Structures\PlayerInfo[]
@throws InvalidArgumentException
|
[
"Returns",
"the",
"list",
"of",
"players",
"on",
"the",
"server",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L4164-L4180
|
234,395
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getCurrentRanking
|
function getCurrentRanking($length = -1, $offset = 0, $multicall = false)
{
if (!is_int($length)) {
throw new InvalidArgumentException('length = ' . print_r($length, true));
}
if (!is_int($offset)) {
throw new InvalidArgumentException('offset = ' . print_r($offset, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($length, $offset), $this->structHandler('PlayerRanking', true));
}
return Structures\PlayerRanking::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset)));
}
|
php
|
function getCurrentRanking($length = -1, $offset = 0, $multicall = false)
{
if (!is_int($length)) {
throw new InvalidArgumentException('length = ' . print_r($length, true));
}
if (!is_int($offset)) {
throw new InvalidArgumentException('offset = ' . print_r($offset, true));
}
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array($length, $offset), $this->structHandler('PlayerRanking', true));
}
return Structures\PlayerRanking::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset)));
}
|
[
"function",
"getCurrentRanking",
"(",
"$",
"length",
"=",
"-",
"1",
",",
"$",
"offset",
"=",
"0",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"length",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'length = '",
".",
"print_r",
"(",
"$",
"length",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"offset",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'offset = '",
".",
"print_r",
"(",
"$",
"offset",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"length",
",",
"$",
"offset",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'PlayerRanking'",
",",
"true",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"PlayerRanking",
"::",
"fromArrayOfArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"length",
",",
"$",
"offset",
")",
")",
")",
";",
"}"
] |
Returns the current rankings for the match in progress.
In script modes, scores aren't returned.
In team modes, the scores for the two teams are returned.
In other modes, it's the individual players' scores.
@param int $length Maximum number of infos to be returned
@param int $offset Starting index in the list
@param bool $multicall
@return Structures\PlayerRanking[]
@throws InvalidArgumentException
|
[
"Returns",
"the",
"current",
"rankings",
"for",
"the",
"match",
"in",
"progress",
".",
"In",
"script",
"modes",
"scores",
"aren",
"t",
"returned",
".",
"In",
"team",
"modes",
"the",
"scores",
"for",
"the",
"two",
"teams",
"are",
"returned",
".",
"In",
"other",
"modes",
"it",
"s",
"the",
"individual",
"players",
"scores",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L4257-L4270
|
234,396
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.forcePlayerTeam
|
function forcePlayerTeam($player, $team, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if ($team !== 0 && $team !== 1) {
throw new InvalidArgumentException('team = ' . print_r($team, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login, $team), $multicall);
}
|
php
|
function forcePlayerTeam($player, $team, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if ($team !== 0 && $team !== 1) {
throw new InvalidArgumentException('team = ' . print_r($team, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login, $team), $multicall);
}
|
[
"function",
"forcePlayerTeam",
"(",
"$",
"player",
",",
"$",
"team",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"login",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"player",
")",
";",
"if",
"(",
"$",
"login",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'player = '",
".",
"print_r",
"(",
"$",
"player",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"$",
"team",
"!==",
"0",
"&&",
"$",
"team",
"!==",
"1",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'team = '",
".",
"print_r",
"(",
"$",
"team",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"login",
",",
"$",
"team",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Force the team of the player.
Only available in team mode.
Only available to Admin.
@param mixed $player Login or player object
@param int $team 0 or 1
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Force",
"the",
"team",
"of",
"the",
"player",
".",
"Only",
"available",
"in",
"team",
"mode",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L4347-L4358
|
234,397
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.forceSpectator
|
function forceSpectator($player, $mode, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if (!is_int($mode) || $mode < 0 || $mode > 3) {
throw new InvalidArgumentException('mode = ' . print_r($mode, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login, $mode), $multicall);
}
|
php
|
function forceSpectator($player, $mode, $multicall = false)
{
$login = $this->getLogin($player);
if ($login === false) {
throw new InvalidArgumentException('player = ' . print_r($player, true));
}
if (!is_int($mode) || $mode < 0 || $mode > 3) {
throw new InvalidArgumentException('mode = ' . print_r($mode, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($login, $mode), $multicall);
}
|
[
"function",
"forceSpectator",
"(",
"$",
"player",
",",
"$",
"mode",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"login",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"player",
")",
";",
"if",
"(",
"$",
"login",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'player = '",
".",
"print_r",
"(",
"$",
"player",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"mode",
")",
"||",
"$",
"mode",
"<",
"0",
"||",
"$",
"mode",
">",
"3",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'mode = '",
".",
"print_r",
"(",
"$",
"mode",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"login",
",",
"$",
"mode",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Force the spectating status of the player.
Only available to Admin.
@param mixed $player Login or player object
@param int $mode 0: user selectable, 1: spectator, 2: player, 3: spectator but keep selectable
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Force",
"the",
"spectating",
"status",
"of",
"the",
"player",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L4369-L4380
|
234,398
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.forceSpectatorTarget
|
function forceSpectatorTarget($spectator, $target, $camera, $multicall = false)
{
$spectatorLogin = $this->getLogin($spectator, true);
if ($spectatorLogin === false) {
throw new InvalidArgumentException('player = ' . print_r($spectator, true));
}
$targetLogin = $this->getLogin($target, true);
if ($targetLogin === false) {
throw new InvalidArgumentException('target = ' . print_r($target, true));
}
if (!is_int($camera) || $camera < -1 || $camera > 2) {
throw new InvalidArgumentException('camera = ' . print_r($camera, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($spectatorLogin, $targetLogin, $camera), $multicall);
}
|
php
|
function forceSpectatorTarget($spectator, $target, $camera, $multicall = false)
{
$spectatorLogin = $this->getLogin($spectator, true);
if ($spectatorLogin === false) {
throw new InvalidArgumentException('player = ' . print_r($spectator, true));
}
$targetLogin = $this->getLogin($target, true);
if ($targetLogin === false) {
throw new InvalidArgumentException('target = ' . print_r($target, true));
}
if (!is_int($camera) || $camera < -1 || $camera > 2) {
throw new InvalidArgumentException('camera = ' . print_r($camera, true));
}
return $this->execute(ucfirst(__FUNCTION__), array($spectatorLogin, $targetLogin, $camera), $multicall);
}
|
[
"function",
"forceSpectatorTarget",
"(",
"$",
"spectator",
",",
"$",
"target",
",",
"$",
"camera",
",",
"$",
"multicall",
"=",
"false",
")",
"{",
"$",
"spectatorLogin",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"spectator",
",",
"true",
")",
";",
"if",
"(",
"$",
"spectatorLogin",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'player = '",
".",
"print_r",
"(",
"$",
"spectator",
",",
"true",
")",
")",
";",
"}",
"$",
"targetLogin",
"=",
"$",
"this",
"->",
"getLogin",
"(",
"$",
"target",
",",
"true",
")",
";",
"if",
"(",
"$",
"targetLogin",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'target = '",
".",
"print_r",
"(",
"$",
"target",
",",
"true",
")",
")",
";",
"}",
"if",
"(",
"!",
"is_int",
"(",
"$",
"camera",
")",
"||",
"$",
"camera",
"<",
"-",
"1",
"||",
"$",
"camera",
">",
"2",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'camera = '",
".",
"print_r",
"(",
"$",
"camera",
",",
"true",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
"$",
"spectatorLogin",
",",
"$",
"targetLogin",
",",
"$",
"camera",
")",
",",
"$",
"multicall",
")",
";",
"}"
] |
Force spectators to look at a specific player.
Only available to Admin.
@param mixed $spectator Login or player object; empty for all
@param mixed $target Login or player object; empty for automatic
@param int $camera -1: leave unchanged, 0: replay, 1: follow, 2: free
@param bool $multicall
@return bool
@throws InvalidArgumentException
|
[
"Force",
"spectators",
"to",
"look",
"at",
"a",
"specific",
"player",
".",
"Only",
"available",
"to",
"Admin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L4392-L4407
|
234,399
|
maniaplanet/dedicated-server-api
|
libraries/Maniaplanet/DedicatedServer/Connection.php
|
Connection.getNetworkStats
|
function getNetworkStats($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('NetworkStats'));
}
return Structures\NetworkStats::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
php
|
function getNetworkStats($multicall = false)
{
if ($multicall) {
return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('NetworkStats'));
}
return Structures\NetworkStats::fromArray($this->execute(ucfirst(__FUNCTION__)));
}
|
[
"function",
"getNetworkStats",
"(",
"$",
"multicall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"multicall",
")",
"{",
"return",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
",",
"array",
"(",
")",
",",
"$",
"this",
"->",
"structHandler",
"(",
"'NetworkStats'",
")",
")",
";",
"}",
"return",
"Structures",
"\\",
"NetworkStats",
"::",
"fromArray",
"(",
"$",
"this",
"->",
"execute",
"(",
"ucfirst",
"(",
"__FUNCTION__",
")",
")",
")",
";",
"}"
] |
Returns a struct containing the networks stats of the server.
Only available to SuperAdmin.
@param bool $multicall
@return Structures\NetworkStats
|
[
"Returns",
"a",
"struct",
"containing",
"the",
"networks",
"stats",
"of",
"the",
"server",
".",
"Only",
"available",
"to",
"SuperAdmin",
"."
] |
c42664b21739fd6335cf2ecfe1907a0eca07c1da
|
https://github.com/maniaplanet/dedicated-server-api/blob/c42664b21739fd6335cf2ecfe1907a0eca07c1da/libraries/Maniaplanet/DedicatedServer/Connection.php#L4496-L4502
|
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.