当前位置: 首页>>代码示例>>PHP>>正文


PHP UserManager::getFromBlid方法代码示例

本文整理汇总了PHP中UserManager::getFromBlid方法的典型用法代码示例。如果您正苦于以下问题:PHP UserManager::getFromBlid方法的具体用法?PHP UserManager::getFromBlid怎么用?PHP UserManager::getFromBlid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserManager的用法示例。


在下文中一共展示了UserManager::getFromBlid方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getSiteAccount

 public function getSiteAccount()
 {
     return UserManager::getFromBlid($this->blid);
 }
开发者ID:BlocklandGlass,项目名称:GlassWebsite,代码行数:4,代码来源:ApiSessionManager.php

示例2: stdClass

$addonIds = AddonManager::getFromBoardID($boardObject->getID(), ($page - 1) * 10, 10);
$ret = new stdClass();
$ret->addons = array();
foreach ($addonIds as $aid) {
    $addon = AddonManager::getFromID($aid);
    if ($addon->getRating() == null) {
        $rating = 0;
    } else {
        $rating = $addon->getRating();
    }
    $retboard = new stdClass();
    $retboard->id = $addon->getId();
    $retboard->name = $addon->getName();
    $user = UserLog::getCurrentUsername($addon->getManagerBLID());
    if ($user == false) {
        $uo = UserManager::getFromBlid($addon->getManagerBLID());
        if ($uo !== false) {
            $user = $uo->getUsername();
        } else {
            $user = "Blockhead";
        }
    } else {
        $user = utf8_encode($user);
    }
    $retboard->author = $user;
    $retboard->rating = $rating;
    $retboard->downloads = $addon->getDownloads("web") + $addon->getDownloads("ingame");
    $ret->addons[] = $retboard;
}
$ret->status = "success";
$ret->board_id = $boardObject->getId();
开发者ID:BlocklandGlass,项目名称:GlassWebsite,代码行数:31,代码来源:board.php

示例3: foreach

    <tbody>
    <?php 
$reclaims = RTBAddonManager::getPendingReclaims();
foreach ($reclaims as $rec) {
    $addon = AddonManager::getFromId($rec->glass_id);
    echo "<tr>";
    echo "<td>";
    echo '<a href="/addons/rtb/view.php?id=' . $rec->id . '">';
    echo $rec->title;
    echo "</a></td>";
    echo "<td>";
    echo '<a href="/addons/addon.php?id=' . $addon->getId() . '">';
    echo $addon->getName();
    echo "</a></td>";
    echo "<td>";
    echo UserManager::getFromBlid($addon->getManagerBLID())->getUsername();
    echo "</td>";
    echo "<td>";
    echo "<form target=\"\" method=\"post\">";
    echo "<input type=\"hidden\" name=\"id\" value=\"" . $rec->id . "\" />";
    echo "<input name=\"action\" value=\"accept\" type=\"image\" src=\"/img/icons16/accept_button.png\" /> ";
    echo "<input name=\"action\" value=\"reject\" type=\"image\" src=\"/img/icons16/delete.png\" />";
    echo "</form>";
    echo "</td>";
    echo "</tr>";
}
if (sizeof($reclaims) == 0) {
    echo "<tr><td colspan=\"3\" style=\"text-align:center\">Nothing to review!</td></tr>";
}
?>
    </tbody>
开发者ID:BlocklandGlass,项目名称:GlassWebsite,代码行数:31,代码来源:reclaims.php

示例4: array

$ret->downloads = $addonObject->getDownloads("web") + $addonObject->getDownloads("ingame");
$ret->rating = $addonObject->getRating();
$ret->screenshots = array();
$screens = ScreenshotManager::getScreenshotsFromAddon($aid);
foreach ($screens as $sid) {
    $ss = ScreenshotManager::getFromId($sid);
    $screenshot = new stdClass();
    $screenshot->id = $ss->getId();
    $screenshot->url = $ss->getUrl();
    $screenshot->thumbnail = $ss->getThumbUrl();
    $screenshot->extent = $ss->getX() . " " . $ss->getY();
    $ret->screenshots[] = $screenshot;
}
$author = new stdClass();
$user = UserLog::getCurrentUsername($addonObject->getManagerBLID());
if ($user == false) {
    $user = UserManager::getFromBlid($addonObject->getManagerBLID())->getUsername();
} else {
    $user = utf8_encode($user);
}
$author->blid = $addonObject->getManagerBLID();
$author->name = $user;
$ret->authors = array($author);
$channelId[1] = "stable";
$channelId[2] = "beta";
$channel = new stdClass();
$channel->id = 1;
$channel->name = "stable";
$channel->version = $addonObject->getVersion();
$ret->branches[] = $channel;
echo json_encode($ret, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
开发者ID:BlocklandGlass,项目名称:GlassWebsite,代码行数:31,代码来源:addon.php


注:本文中的UserManager::getFromBlid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。