本文整理汇总了PHP中Tags::format方法的典型用法代码示例。如果您正苦于以下问题:PHP Tags::format方法的具体用法?PHP Tags::format怎么用?PHP Tags::format使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tags
的用法示例。
在下文中一共展示了Tags::format方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
/**
* Create a service
* @link https://apidocs.serverdensity.com/?python#creating-a-service
* @param array $service with all it's attributes.
* @return an array that is the device.
*/
public function create($service, array $tagNames = array())
{
if (!empty($tagNames)) {
$tagEndpoint = new Tags($this->client);
$tags = $tagEndpoint->findAll($tagNames);
if (!empty($tags['notFound'])) {
foreach ($tags['notFound'] as $name) {
$tags['tags'][] = $tagEndpoint->create($name);
}
}
$formattedTags = $tagEndpoint->format($tags['tags'], 'other');
$service['tags'] = $formattedTags['tags'];
}
$service = $this->makeJsonReady($service);
return $this->post('inventory/services/', $service);
}
示例2: create
/**
* Create a user
* @link https://apidocs.serverdensity.com/#creating-a-user
* @param array $user
* @return an array with the user that got created
*/
public function create(array $user, array $tagNames = array())
{
if (!empty($tagNames)) {
$tagEndpoint = new Tags($this->client);
$tags = $tagEndpoint->findAll($tagNames);
if (!empty($tags['notFound'])) {
foreach ($tags['notFound'] as $name) {
$tags['tags'][] = $tagEndpoint->create($name);
}
}
$formattedTags = $tagEndpoint->format($tags['tags'], 'user');
// don't overwrite permission array if user creates his own.
if (!empty($user['permissions'])) {
$user['permissions'] = array_merge($user['permissions'], $formattedTags);
} else {
$user['permissions'] = $formattedTags;
}
}
$user = $this->makeJsonReady($user);
return $this->post('users/users/', $user);
}
示例3: unset
?>
<span class="add_bookmark float_right">
<a style="float: right;" href="#" id="bookmarklink_torrent_<?php
echo $GroupID;
?>
" class="add_bookmark brackets" onclick="Bookmark('torrent', <?php
echo $GroupID;
?>
, 'Remove bookmark'); return false;">Bookmark</a>
</span>
<?php
}
Votes::vote_link($GroupID, $UserVote);
?>
<div class="tags"><?php
echo $TorrentTags->format();
?>
</div>
</td>
</tr>
<?php
$LastRemasterYear = '-';
$LastRemasterTitle = '';
$LastRemasterRecordLabel = '';
$LastRemasterCatalogueNumber = '';
$LastMedia = '';
$EditionID = 0;
unset($FirstUnknown);
foreach ($Torrents as $TorrentID => $Torrent) {
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
$FirstUnknown = !isset($FirstUnknown);
示例4: unset
?>
<div class="group_image float_left clear">
<?php
ImageTools::cover_thumb($WikiImage, $GroupCategoryID);
?>
</div>
<?php
}
?>
<div class="group_info clear">
<strong><?php
echo $DisplayName;
?>
</strong>
<div class="tags"><?php
echo $TorrentTags->format();
?>
</tags>
</div>
</td>
</tr>
<?php
$LastRemasterYear = '-';
$LastRemasterTitle = '';
$LastRemasterRecordLabel = '';
$LastRemasterCatalogueNumber = '';
$LastMedia = '';
$EditionID = 0;
unset($FirstUnknown);
foreach ($Torrents as $TorrentID => $Torrent) {
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
示例5: time_diff
, 'Bookmark'); return false;">Remove bookmark</a>
</span>
<? } else { ?>
<span class="add_bookmark float_right">
<a href="#" id="bookmarklink_torrent_<?php
echo $GroupID;
?>
" class="brackets" onclick="Bookmark('torrent', <?php
echo $GroupID;
?>
, 'Remove bookmark'); return false;">Bookmark</a>
</span>
<? } ?>
<br />
<div class="tags"><?php
echo $TorrentTags->format('torrents.php?' . $Action . '&taglist=');
?>
</div>
</div>
</td>
<td class="nobr"><?php
echo time_diff($GroupTime, 1);
?>
</td>
<td class="number_column nobr"><?php
echo Format::get_size($MaxSize);
?>
(Max)</td>
<td class="number_column"><?php
echo number_format($TotalSnatched);
?>
示例6: isset
echo $LoggedUser['AuthKey'];
?>
&torrent_pass=<?php
echo $LoggedUser['torrent_pass'];
?>
" title="Download" class="brackets tooltip">DL</a>
</span>
<?php
echo $DisplayName;
?>
<div class="torrent_info"><?php
echo $Edition['EditionName'];
?>
</div>
<div class="tags"><?php
echo $TorrentTags->format('better.php?action=transcode&tags=');
?>
</div>
</td>
<td><?php
echo isset($Edition['MP3s']['V2 (VBR)']) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>';
?>
</td>
<td><?php
echo isset($Edition['MP3s']['V0 (VBR)']) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>';
?>
</td>
<td><?php
echo isset($Edition['MP3s']['320']) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>';
?>
</td>
示例7: isset
?>
&torrent_pass=<?php
echo $LoggedUser['torrent_pass'];
?>
" class="tooltip" title="Download">DL</a>
| <a href="reportsv2.php?action=report&id=<?php
echo $TorrentID;
?>
" class="tooltip" title="Report">RP</a> ]
</span>
<?php
echo "{$DisplayName}\n";
Votes::vote_link($GroupID, isset($UserVotes[$GroupID]) ? $UserVotes[$GroupID]['Type'] : '');
?>
<div class="tags"><?php
echo $TorrentTags->format('torrents.php?type=' . $Action . '&userid=' . $UserID . '&tags=');
?>
</div>
</div>
</td>
<td class="nobr"><?php
echo time_diff($Time, 1);
?>
</td>
<td class="number_column nobr"><?php
echo Format::get_size($Torrent['Size']);
?>
</td>
<td class="number_column"><?php
echo number_format($Torrent['Snatched']);
?>
示例8: generate_torrent_table
//.........这里部分代码省略.........
<div class="group_image float_left clear">
<?php
ImageTools::cover_thumb($WikiImage, $GroupCategoryID);
?>
</div>
<?php
}
?>
<div class="group_info clear">
<span><a href="torrents.php?action=download&id=<?php
echo $TorrentID;
?>
&authkey=<?php
echo $LoggedUser['AuthKey'];
?>
&torrent_pass=<?php
echo $LoggedUser['torrent_pass'];
?>
" title="Download" class="brackets tooltip">DL</a></span>
<strong><?php
echo $DisplayName;
?>
</strong> <?php
echo $ExtraInfo;
if ($Reported) {
?>
- <strong class="torrent_label tl_reported">Reported</strong><?php
}
if ($IsBookmarked) {
?>
<span class="remove_bookmark float_right">
<a href="#" id="bookmarklink_torrent_<?php
echo $GroupID;
?>
" class="bookmarklink_torrent_<?php
echo $GroupID;
?>
brackets" onclick="Unbookmark('torrent', <?php
echo $GroupID;
?>
, 'Bookmark'); return false;">Remove bookmark</a>
</span>
<?php
} else {
?>
<span class="add_bookmark float_right">
<a href="#" id="bookmarklink_torrent_<?php
echo $GroupID;
?>
" class="bookmarklink_torrent_<?php
echo $GroupID;
?>
brackets" onclick="Bookmark('torrent', <?php
echo $GroupID;
?>
, 'Remove bookmark'); return false;">Bookmark</a>
</span>
<?php
}
?>
<div class="tags"><?php
echo $TorrentTags->format();
?>
</div>
</div>
</td>
<td class="number_column nobr"><?php
echo Format::get_size($Size);
?>
</td>
<td class="number_column nobr"><?php
echo Format::get_size($Data);
?>
</td>
<td class="number_column"><?php
echo number_format((double) $Snatched);
?>
</td>
<td class="number_column"><?php
echo number_format((double) $Seeders);
?>
</td>
<td class="number_column"><?php
echo number_format((double) $Leechers);
?>
</td>
<td class="number_column"><?php
echo number_format($Seeders + $Leechers);
?>
</td>
</tr>
<?php
}
//foreach ($Details as $Detail)
?>
</table><br />
<?php
}
示例9: isset
<span class="add_bookmark float_right">
<a style="float: right;" href="#" id="bookmarklink_torrent_<?php
echo $GroupID;
?>
" class="brackets" onclick="Bookmark('torrent', <?php
echo $GroupID;
?>
, 'Remove bookmark'); return false;">Bookmark</a>
</span>
<?php
}
$VoteType = isset($UserVotes[$GroupID]['Type']) ? $UserVotes[$GroupID]['Type'] : '';
Votes::vote_link($GroupID, $VoteType);
?>
<div class="tags"><?php
echo $TorrentTags->format('torrents.php?taglist=', $Name);
?>
</div>
</div>
</td>
</tr>
<?php
$LastRemasterYear = '-';
$LastRemasterTitle = '';
$LastRemasterRecordLabel = '';
$LastRemasterCatalogueNumber = '';
$LastMedia = '';
$EditionID = 0;
unset($FirstUnknown);
foreach ($Torrents as $TorrentID => $Torrent) {
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
示例10:
?>
</a>
<?php
if ($BookmarkView) {
?>
<span style="float: right;">
<a href="#" onclick="Unbookmark('collage', <?php
echo $ID;
?>
, ''); return false;" class="brackets">Remove bookmark</a>
</span>
<?php
}
?>
<div class="tags"><?php
echo $TorrentTags->format('collages.php?action=search&tags=');
?>
</div>
</td>
<td class="number_column"><?php
echo number_format((int) $NumTorrents);
?>
</td>
<td class="number_column"><?php
echo number_format((int) $Subscribers);
?>
</td>
<td class="nobr"><?php
echo time_diff($Updated);
?>
</td>