当前位置: 首页>>代码示例>>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;未经允许,请勿转载。