当前位置: 首页>>代码示例>>PHP>>正文


PHP assetParamsPeer::getCriteriaFilter方法代码示例

本文整理汇总了PHP中assetParamsPeer::getCriteriaFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP assetParamsPeer::getCriteriaFilter方法的具体用法?PHP assetParamsPeer::getCriteriaFilter怎么用?PHP assetParamsPeer::getCriteriaFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在assetParamsPeer的用法示例。


在下文中一共展示了assetParamsPeer::getCriteriaFilter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
     myPartnerUtils::resetPartnerFilter('assetParams');
     $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:DBezemer,项目名称:server,代码行数:41,代码来源:myConversionProfileUtils.class.php

示例2: attachCriteriaFilter

 /**
  * the filterCriteria will filter out all the doSelect methods - ONLY if the filter is turned on.
  * IMPORTANT - the filter is turend on by default and when switched off - should be turned on again manually .
  * 
  * @param      Criteria $criteria The Criteria object used to build the SELECT statement.
  */
 protected static function attachCriteriaFilter(Criteria $criteria)
 {
     assetParamsPeer::getCriteriaFilter()->applyFilter($criteria);
 }
开发者ID:dozernz,项目名称:server,代码行数:10,代码来源:BaseassetParamsPeer.php

示例3: filterSelectResults

 public static function filterSelectResults(&$selectResults, Criteria $criteria)
 {
     $criteria_filter = assetParamsPeer::getCriteriaFilter();
     if (!$criteria_filter->isEnabled() || !self::$filterPartner) {
         return;
     }
     $selectResults = array_filter($selectResults, array('assetParamsPeer', 'filterSelectResultsCallback'));
 }
开发者ID:DBezemer,项目名称:server,代码行数:8,代码来源:assetParamsPeer.php

示例4: populateObjects

 /**
  * Overrides parent populateObjects method
  * Force partner required permissions
  *
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function populateObjects(PDOStatement $stmt)
 {
     $criteria_filter = assetParamsPeer::getCriteriaFilter();
     $results = array();
     // populate the object(s)
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key = assetParamsPeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj = assetParamsPeer::getInstanceFromPool($key))) {
             // We no longer rehydrate the object, since this can cause data loss.
             // See http://propel.phpdb.org/trac/ticket/509
             // $obj->hydrate($row, 0, true); // rehydrate
             $results[] = $obj;
         } else {
             // class must be set each time from the record row
             $cls = assetParamsPeer::getOMClass($row, 0);
             $cls = substr('.' . $cls, strrpos('.' . $cls, '.') + 1);
             $obj = new $cls();
             $obj->hydrate($row);
             if ($criteria_filter->isEnabled() && self::$filterPartner) {
                 $requiredPermissions = $obj->getRequiredPermissions();
                 if ($requiredPermissions && count($requiredPermissions)) {
                     foreach ($requiredPermissions as $requiredPermission) {
                         if (!PermissionPeer::isValidForPartner($requiredPermission, self::$filterPartner)) {
                             self::excludeId($obj->getId());
                             $obj = null;
                         }
                     }
                 }
             }
             if ($obj) {
                 $results[] = $obj;
                 assetParamsPeer::addInstanceToPool($obj, $key);
             }
         }
         // if key exists
     }
     $stmt->closeCursor();
     return $results;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:46,代码来源:assetParamsPeer.php


注:本文中的assetParamsPeer::getCriteriaFilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。