當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Package::getDescription方法代碼示例

本文整理匯總了PHP中Package::getDescription方法的典型用法代碼示例。如果您正苦於以下問題:PHP Package::getDescription方法的具體用法?PHP Package::getDescription怎麽用?PHP Package::getDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Package的用法示例。


在下文中一共展示了Package::getDescription方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: makePackageArray

 protected function makePackageArray(Package $pkg)
 {
     $tags = array();
     foreach ($pkg->getTags() as $t) {
         $tags[] = $t->getName();
     }
     return array('package_url' => mfwRequest::makeUrl("/package?id={$pkg->getId()}"), 'application_url' => mfwRequest::makeUrl("/app?id={$pkg->getAppId()}"), 'id' => $pkg->getId(), 'platform' => $pkg->getPlatform(), 'title' => $pkg->getTitle(), 'description' => $pkg->getDescription(), 'ios_identifier' => $pkg->getIOSIdentifier(), 'original_file_name' => $pkg->getOriginalFileName(), 'file_size' => $pkg->getFileSize(), 'created' => $pkg->getCreated(), 'tags' => $tags, 'install_count' => $pkg->getInstallCount());
 }
開發者ID:kzfk,項目名稱:emlauncher,代碼行數:8,代碼來源:actions.php

示例2: foreach

    }
    if (empty($_POST['description'])) {
        $errors[] = "No description provided";
    } else {
        $description = test_input($_POST['description']);
    }
    if (empty($_POST['gear'])) {
        $errors[] = "No gear in package";
    } else {
        $gearList = $_POST['gear'];
    }
    if (empty($errors)) {
        if (!empty($title) && $title != $pkg->getTitle()) {
            $pkg->setTitle($title);
        }
        if ($description != $pkg->getDescription()) {
            $pkg->setDescription($description);
        }
        $pkg->clearGearList();
        foreach ($gearList as $gear) {
            $pkg->addToGearList($gear);
        }
        $pkg->finalizePackage();
        $successes[] = "Package updated";
    }
}
?>

<!DOCTYPE html>
<html lang="en">
開發者ID:JakeDawkins,項目名稱:Checkout,代碼行數:30,代碼來源:edit-package.php

示例3: foreach

    <div class="container">
        <div class="row">
            <div class="col-sm-8 col-sm-offset-2">
            <?php 
echo "<a href='packages.php'><span class='glyphicon glyphicon-chevron-left'></span>&nbsp;&nbsp;Back to Packages</a>";
?>
            <br /><br />
                <div class="panel panel-default">
                    <div class="panel-heading text-center">Package Details</div>
                    <div class="panel-body text-center">
                        <p>
                        <?php 
echo "<strong>Package ID:</strong> " . $pkg_id . "<br /><br />";
echo "<strong>Title:</strong> " . $pkg->getTitle() . "<br /><br />";
echo "<strong>Description:</strong> " . $pkg->getDescription() . "<br /><br />";
echo "<a class='btn btn-primary' href='edit-package.php?pkg_id=" . $pkg_id . "'>Edit</a> &nbsp;&nbsp;";
echo "<a class='btn btn-danger' href='package.php?pkg_id=" . $pkg_id . "&delete=true'>Delete</a>";
?>
                        </p>
                    </div>
                </div>
            </div><!-- end col -->
        </div><!-- end row -->

        <?php 
if (count($gearTypes) == 1) {
    //1 across
    echo "<div class='row'>";
    foreach ($gearTypes as $gearType) {
        echo "<div class='col-sm-8 col-sm-offset-2'>";
開發者ID:JakeDawkins,項目名稱:Checkout,代碼行數:30,代碼來源:package.php


注:本文中的Package::getDescription方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。