本文整理匯總了PHP中pdo::getArtists方法的典型用法代碼示例。如果您正苦於以下問題:PHP pdo::getArtists方法的具體用法?PHP pdo::getArtists怎麽用?PHP pdo::getArtists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pdo
的用法示例。
在下文中一共展示了pdo::getArtists方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: exhibitionPdoToBean
/**
* Converts the given exhibition PDO to a bean object.
* This includes the conversion from nested lists
* of PDO objects to usable lists of oids/names to be used
* by the page renderer.
*
* @access private
* @param pdo $pdo Program
* @return bean Program
*/
private function exhibitionPdoToBean($pdo)
{
global $logger;
$logger->debug(get_class($this) . "::exhibitionPdoToBean({$pdo})");
$bean = new Exhibition($pdo->epGetVars());
// pubState to a string
$ps = '';
if ($pdo->getPubState() != null) {
$ps = $pdo->getPubState()->getValue();
}
$bean->setPubState($ps);
// eventStatus to a string
$es = '';
if ($pdo->getEventStatus() != null) {
$es = $pdo->getEventStatus()->getValue();
}
$bean->setEventStatus($es);
// schedule
$schedule = $pdo->getSchedule();
if ($schedule) {
$bean->setSchedule(new Schedule($schedule->epGetVars()));
} else {
$bean->setSchedule(new Schedule());
}
// venues from array of pdos to array of venue bean
$vens = array();
if ($pdo->getVenues() != null) {
foreach ($pdo->getVenues() as $ven) {
$vens[] = new Venue($ven->epGetVars());
}
}
$bean->setVenues($vens);
// categories from array of pdos to keyed array of oids
$cats = array();
if ($pdo->getCategories() != null) {
foreach ($pdo->getCategories() as $cat) {
$scope = $cat->getScope();
$cats[$scope][] = new $scope($cat->epGetVars());
}
}
$bean->setCategories($cats);
// related programs from array of pdos to keyed array of oids
$programs = $pdo->getPrograms();
if ($programs != null) {
$related = array();
foreach ($programs as $event) {
$rp = new Program($event->epGetVars());
$ps = $event->getPubState()->getValue();
$rp->setPubState($ps);
// primary genre
if ($event->getPrimaryGenre()) {
$pg = $event->getPrimaryGenre();
$prpg = new Category(array("oid" => $pg->getOid(), "name" => $pg->getName()));
$rp->setPrimaryGenre($prpg);
}
$acts = array();
foreach ($event->getChildren() as $perf) {
$sch = new Performance($perf->epGetVars());
$sch->setSchedule(new Schedule($perf->schedule->epGetVars()));
$acts[] = $sch;
}
usort($acts, array(&$this, "orderPerformances"));
$rp->setChildren($acts);
// Using "Nextevent" so we can use orderProgramsByNextevent; really is firstEvent
$rp->setNextevent($acts[0]->schedule->getStartTime());
$related[] = $rp;
}
usort($related, array(&$this, "orderProgramsByNextevent"));
$bean->setPrograms($related);
}
// related courses from array of pdos to keyed array of oids
$courses = $pdo->getCourses();
if ($courses != null) {
$related = array();
foreach ($courses as $event) {
$related[] = new Course($event->epGetVars());
}
$bean->setCourses($related);
}
// related artists
$artists = $pdo->getArtists();
if ($artists != null) {
$related = array();
foreach ($artists as $person) {
$related[] = new Artist($person->epGetVars());
}
$bean->setArtists($related);
}
return $bean;
}