本文整理汇总了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>';
}
示例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;
}
示例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;
}