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


PHP Resource::setDescription方法代碼示例

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


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

示例1: composeResources

 function composeResources($resourceList)
 {
     //CODICE DI PROVAA!!!!
     $risorsa1 = new Resource();
     $risorsa1->setLogo("HiernateIco.jpg");
     $risorsa1->setTitle("Titolo 1");
     $risorsa1->setDescription("descrizione della risorsa 1, tipo etc");
     $resourceArray = array($risorsa1);
     print "<div id='resourceBlock'>";
     foreach ($resourceArray as $i) {
         if ($risorsa1->getLogo() != NULL) {
             print "<p><h2><a href='" . $i->getHomeUrl() . "'><img src='" . $i->getLogo() . "' /></a>" . $i->getTitle() . "</h2></p>";
         } else {
             print "<p><h2>" . $i->getTitle() . "</h2></p>";
         }
         print "<p class='results'>" . $i->getDescription() . "</p>";
         print "<div>" . $this->composeResultsInResources($i->getResults()) . "</div>";
         print "<br/>";
     }
     print "<p>That's not what you expected? Improve your search, insert a synonim: <input type='text' action='resultShower.php' method='POST' /></p>";
     print '<hr/></div>';
 }
開發者ID:paradoxengine,項目名稱:tagonto,代碼行數:22,代碼來源:PresentationManager.php

示例2: createFromDBRow

 private function createFromDBRow($row)
 {
     $r = new Resource($row[DB::RESOURCE_OWNER], $row[DB::RESOURCE_PATH], $row[DB::RESOURCE_TYPE]);
     $r->setID($row[DB::RESOURCE_ID]);
     $r->setDescription($row[DB::RESOURCE_DESCRIPTION])->setCreationDate($row[DB::RESOURCE_CREATION_DATE])->setTags($row[DB::RESOURCE_TAGS]);
     if (!is_null($row[DB::RESOURCE_MODIFICATION_DATE])) {
         $mod = $row[DB::RESOURCE_MODIFICATION_DATE];
     } else {
         $mod = $row[DB::RESOURCE_CREATION_DATE];
     }
     $r->setModificationDate(date_timestamp_get(date_create_from_format("Y-m-d G:i:s", $mod)));
     //setto lo stato
     $r->setEditable($row[DB::EDITABLE])->setRemovable($row[DB::REMOVABLE]);
     $r->setBlackContent($row[DB::BLACK_CONTENT])->setRedContent($row[DB::RED_CONTENT])->setYellowContent($row[DB::YELLOW_CONTENT])->setAutoBlackContent($row[DB::AUTO_BLACK_CONTENT]);
     $user = Session::getUser();
     if ($this->loadReports && AuthorizationManager::canUserDo(AuthorizationManager::READ_REPORTS, $r)) {
         require_once 'dao/ReportDao.php';
         $reportDao = new ReportDao();
         $reportDao->loadAll($r);
     }
     //$r->setAccessCount($this->getAccessCount($r));
     return $r;
 }
開發者ID:Esisto,項目名稱:IoEsisto,代碼行數:23,代碼來源:ResourceDao.php

示例3: getResourcesForTag

 public function getResourcesForTag($tag = "", $pluginname = "")
 {
     if (empty($tag) || empty($pluginname)) {
         return null;
     }
     foreach ($this->_PluginsLoaded as $Plugin) {
         if (method_exists($Plugin, "getResourcesForTag") && $Plugin->getName() == $pluginname) {
             $res = new Resource();
             $res->setTitle($Plugin->getName());
             $res->setLogo($Plugin->getLogo());
             $res->setDescription($Plugin->getDescription());
             $res->setHomeUrl($Plugin->getWebURL());
             $res->setResults($Plugin->getResourcesForTag($tag));
             $Bundle[] = $res;
         }
     }
     return $Bundle;
 }
開發者ID:paradoxengine,項目名稱:tagonto,代碼行數:18,代碼來源:PluginManager.php


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