Exemple #1
0
 public static function retrieveOrderedEdgeServersArrayByPKs($pks, PropelPDO $con = null)
 {
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(EdgeServerPeer::DATABASE_NAME);
         $criteria->add(EdgeServerPeer::ID, $pks, Criteria::IN);
         $criteria->add(EdgeServerPeer::STATUS, EdgeServerStatus::ACTIVE);
         $orderBy = "FIELD (" . self::ID . "," . implode(",", $pks) . ")";
         // first take the pattner_id and then the rest
         $criteria->addAscendingOrderByColumn($orderBy);
         $objs = EdgeServerPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
 /**	
  * @action list
  * @param KalturaEdgeServerFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaEdgeServerListResponse
  */
 public function listAction(KalturaEdgeServerFilter $filter = null, KalturaFilterPager $pager = null)
 {
     $c = new Criteria();
     if (!$filter) {
         $filter = new KalturaEdgeServerFilter();
     }
     $edgeSeverFilter = new EdgeServerFilter();
     $filter->toObject($edgeSeverFilter);
     $edgeSeverFilter->attachToCriteria($c);
     $list = EdgeServerPeer::doSelect($c);
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $pager->attachToCriteria($c);
     $response = new KalturaEdgeServerListResponse();
     $response->totalCount = EdgeServerPeer::doCount($c);
     $response->objects = KalturaEdgeServerArray::fromDbArray($list, $this->getResponseProfile());
     return $response;
 }
 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      PropelPDO $con the connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function retrieveByPKs($pks, PropelPDO $con = null)
 {
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(EdgeServerPeer::DATABASE_NAME);
         $criteria->add(EdgeServerPeer::ID, $pks, Criteria::IN);
         $objs = EdgeServerPeer::doSelect($criteria, $con);
     }
     return $objs;
 }