本文整理汇总了PHP中kshowPeer::retrieveByPKs方法的典型用法代码示例。如果您正苦于以下问题:PHP kshowPeer::retrieveByPKs方法的具体用法?PHP kshowPeer::retrieveByPKs怎么用?PHP kshowPeer::retrieveByPKs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kshowPeer
的用法示例。
在下文中一共展示了kshowPeer::retrieveByPKs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* Will investigate a single entry
*/
public function execute()
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
$this->forceSystemAuthentication();
entryPeer::setUseCriteriaFilter(false);
$this->result = NULL;
$kshow_ids = @$_REQUEST["kshow_ids"];
$this->kshow_ids = $kshow_ids;
$this->kshow = NULL;
$entry_ids = @$_REQUEST["entry_ids"];
$this->entry_ids = $entry_ids;
$this->entry = NULL;
$this->show_entry = null;
$show_entry_list = array();
if (!empty($kshow_ids)) {
$ids_arr = explode(",", $kshow_ids);
$kshows = kshowPeer::retrieveByPKs($ids_arr);
if (!$kshows) {
$this->result = "No kshows [{$kshow_ids}] in DB";
return;
}
foreach ($kshows as $kshow) {
$show_entry = $kshow->getShowEntry();
$show_entry_list[] = $show_entry;
}
} else {
if (empty($entry_ids)) {
$this->result = "Submit an entry_id of a kshow_id to fix";
return;
}
$ids_arr = explode(",", $entry_ids);
$entries = entryPeer::retrieveByPKs($ids_arr);
if (!$entries) {
$this->result = "No entries [{$entry_ids}] in DB";
return;
}
foreach ($entries as $entry) {
if ($entry->getType() != entryType::MIX) {
continue;
}
$show_entry_list[] = $entry;
}
}
$fixed_data_list = array();
foreach ($show_entry_list as $show_entry) {
$fix_data = new fixData();
$fix_data->show_entry = $show_entry;
if ($show_entry->getType() != entryType::MIX) {
$fix_data->error = "Entry is not a roughcut";
} else {
$fix_data->old_content = $show_entry->getMetadata();
$fix_data->old_duration = $show_entry->getLengthInMsecs();
$fix_data->fixed_content = $show_entry->fixMetadata(false);
$fix_data->fixed_duration = $show_entry->getLengthInMsecs();
}
$fixed_data_list[] = $fix_data;
}
$this->fixed_data_list = $fixed_data_list;
}