本文整理匯總了PHP中assetParamsPeer::setDefaultCriteriaFilter方法的典型用法代碼示例。如果您正苦於以下問題:PHP assetParamsPeer::setDefaultCriteriaFilter方法的具體用法?PHP assetParamsPeer::setDefaultCriteriaFilter怎麽用?PHP assetParamsPeer::setDefaultCriteriaFilter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類assetParamsPeer
的用法示例。
在下文中一共展示了assetParamsPeer::setDefaultCriteriaFilter方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getFlavorParamsFromFileFormat
/**
* return the flavor params the best fits the fileFormat for a given partner_id
*
* @param int $partnerId
* @param string $fileFormat
* @return FlavorParams
*/
public static function getFlavorParamsFromFileFormat($partnerId, $fileFormat, $ignoreSourceTag = true)
{
$defaultCriteria = assetParamsPeer::getCriteriaFilter()->getFilter();
$defaultCriteria->remove(assetParamsPeer::PARTNER_ID);
// assetParamsPeer::allowAccessToPartner0AndPartnerX($partnerId); // the flavor params can be from partner 0 too
$c = new Criteria();
$c->addAnd(assetParamsPeer::PARTNER_ID, array($partnerId, 0), Criteria::IN);
// $c->add ( assetParamsPeer::FORMAT , $fileFormat );
$possible_flavor_params = assetParamsPeer::doSelect($c);
assetParamsPeer::setDefaultCriteriaFilter();
$best_fp = null;
foreach ($possible_flavor_params as $fp) {
if ($fileFormat != $fp->getFormat()) {
continue;
}
if ($ignoreSourceTag && $fp->hasTag(flavorParams::TAG_SOURCE)) {
continue;
}
if (!$best_fp) {
$best_fp = $fp;
}
if ($fp->getPartnerId() != $partnerId) {
continue;
}
// same format for the partner
$best_fp = $fp;
break;
}
// if not fount any - choose the first flavor params from the list
if (!$best_fp) {
$best_fp = $possible_flavor_params[0];
}
return $best_fp;
}
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:41,代碼來源:myConversionProfileUtils.class.php
示例2:
/**
* Returns the default criteria filter
*
* @return criteriaFilter The default criteria filter.
*/
public static function &getCriteriaFilter()
{
if (self::$s_criteria_filter == null) {
assetParamsPeer::setDefaultCriteriaFilter();
}
$partnerCriteria = myPartnerUtils::getPartnerCriteriaParams('assetParams');
if ($partnerCriteria) {
call_user_func_array(array('assetParamsPeer', 'addPartnerToCriteria'), $partnerCriteria);
}
return self::$s_criteria_filter;
}
示例3:
/**
* Returns the default criteria filter
*
* @return criteriaFilter The default criteria filter.
*/
public static function &getCriteriaFilter()
{
if (self::$s_criteria_filter == null) {
assetParamsPeer::setDefaultCriteriaFilter();
}
return self::$s_criteria_filter;
}