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
779791
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);
    }
667224
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);
    }
709489
public function isMultilingualField($fieldName)
    {
        $fieldName = strtolower($fieldName);
        if (isset($this->_aFieldNames[$fieldName])) {
            return (bool) $this->_aFieldNames[$fieldName];
        }

        //not inited field yet
        //and note that this is should be called only in first call after tmp dir is empty
        startProfile('!__CACHABLE2__!');
        $isMultilang = (bool) $this->_getFieldStatus($fieldName);
        stopProfile('!__CACHABLE2__!');

        return (bool) $isMultilang;
    }
66389
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);
    }
1353785
function exists( $filename = false )
    {
        if ( !$filename )
            $filename = $this->FileName;
        return $this->doExists( $filename );
    }
499791
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);
    }
189212
function joinServerLan($host, $password = '', $multicall = false)
    {
        if (!is_string($host)) {
            throw new InvalidArgumentException('host = ' . print_r($host, true));
        }
        if (!is_string($password)) {
            throw new InvalidArgumentException('password = ' . print_r($password, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array(array('Server' => $host, 'ServerPassword' => $password)), $multicall);
    }
556073
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)));
    }
51687
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);
        }
    }
121029
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'));
    }
923787
function getCurrentGameInfo($multicall = false)
    {
        if ($multicall) {
            return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('GameInfos'));
        }
        return Structures\GameInfos::fromArray($this->execute(ucfirst(__FUNCTION__)));
    }
185127
function writeFileFromFile($filename, $localFilename, $multicall = false)
    {
        if (!file_exists($localFilename)) {
            throw new InvalidArgumentException('localFilename = ' . print_r($localFilename, true));
        }

        $contents = file_get_contents($localFilename);
        return $this->writeFile($filename, $contents, $multicall);
    }
81638
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);
    }
1224941
public function fileExists($filename)
    {
        return isset($this->_fileHandlers[$filename]) ||
               file_exists($this->_dirPath . '/' . $filename);
    }
1364886
function getLobbyInfo($multicall = false)
    {
        if ($multicall) {
            return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('LobbyInfo'));
        }
        return Structures\LobbyInfo::fromArray($this->execute(ucfirst(__FUNCTION__)));
    }
1126029
public static function isGdFile($filename)
    {
        if (!is_file($filename) || !is_readable($filename)) {
            throw new \InvalidArgumentException(sprintf(
                    '"%s" Is Not A Readable File', $filename
            ));
        }
        $result = false;
        $f = null;
        if (($f = @fopen($filename, 'r'))) {
            if (($id = @fread($f, 3))) {
                $result = ('gd2' === strtolower($id)) ? true : false;
            }
        }
        @fclose($f);

        return $result;
    }
1277540
private function hasCall(string $methodName)
    {
        foreach ($this->getCalls() as $call) {
            if ($call->getMethodName() === $methodName) {
                return true;
            }
        }

        return false;
    }