當前位置: 首頁>>代碼示例>>PHP>>正文


PHP sfGuardUserGroupPeer::doSelect方法代碼示例

本文整理匯總了PHP中sfGuardUserGroupPeer::doSelect方法的典型用法代碼示例。如果您正苦於以下問題:PHP sfGuardUserGroupPeer::doSelect方法的具體用法?PHP sfGuardUserGroupPeer::doSelect怎麽用?PHP sfGuardUserGroupPeer::doSelect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在sfGuardUserGroupPeer的用法示例。


在下文中一共展示了sfGuardUserGroupPeer::doSelect方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getsfGuardUserGroups

 /**
  * Gets an array of sfGuardUserGroup objects which contain a foreign key that references this object.
  *
  * If this collection has already been initialized with an identical Criteria, it returns the collection.
  * Otherwise if this sfGuardUser has previously been saved, it will retrieve
  * related sfGuardUserGroups from storage. If this sfGuardUser is new, it will return
  * an empty collection or the current collection, the criteria is ignored on a new object.
  *
  * @param      PropelPDO $con
  * @param      Criteria $criteria
  * @return     array sfGuardUserGroup[]
  * @throws     PropelException
  */
 public function getsfGuardUserGroups($criteria = null, PropelPDO $con = null)
 {
     if ($criteria === null) {
         $criteria = new Criteria(sfGuardUserPeer::DATABASE_NAME);
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collsfGuardUserGroups === null) {
         if ($this->isNew()) {
             $this->collsfGuardUserGroups = array();
         } else {
             $criteria->add(sfGuardUserGroupPeer::USER_ID, $this->id);
             sfGuardUserGroupPeer::addSelectColumns($criteria);
             $this->collsfGuardUserGroups = sfGuardUserGroupPeer::doSelect($criteria, $con);
         }
     } else {
         // criteria has no effect for a new object
         if (!$this->isNew()) {
             // the following code is to determine if a new query is
             // called for.  If the criteria is the same as the last
             // one, just return the collection.
             $criteria->add(sfGuardUserGroupPeer::USER_ID, $this->id);
             sfGuardUserGroupPeer::addSelectColumns($criteria);
             if (!isset($this->lastsfGuardUserGroupCriteria) || !$this->lastsfGuardUserGroupCriteria->equals($criteria)) {
                 $this->collsfGuardUserGroups = sfGuardUserGroupPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastsfGuardUserGroupCriteria = $criteria;
     return $this->collsfGuardUserGroups;
 }
開發者ID:voota,項目名稱:voota,代碼行數:44,代碼來源:BasesfGuardUser.php

示例2: getsfGuardUserGroups

 public function getsfGuardUserGroups($criteria = null, $con = null)
 {
     include_once 'plugins/sfGuardPlugin/lib/model/om/BasesfGuardUserGroupPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collsfGuardUserGroups === null) {
         if ($this->isNew()) {
             $this->collsfGuardUserGroups = array();
         } else {
             $criteria->add(sfGuardUserGroupPeer::USER_ID, $this->getId());
             sfGuardUserGroupPeer::addSelectColumns($criteria);
             $this->collsfGuardUserGroups = sfGuardUserGroupPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(sfGuardUserGroupPeer::USER_ID, $this->getId());
             sfGuardUserGroupPeer::addSelectColumns($criteria);
             if (!isset($this->lastsfGuardUserGroupCriteria) || !$this->lastsfGuardUserGroupCriteria->equals($criteria)) {
                 $this->collsfGuardUserGroups = sfGuardUserGroupPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastsfGuardUserGroupCriteria = $criteria;
     return $this->collsfGuardUserGroups;
 }
開發者ID:sgrove,項目名稱:cothinker,代碼行數:28,代碼來源:BasesfGuardUser.php

示例3: retrieveByPK

 /**
  * Retrieve object using using composite pkey values.
  * @param      string $user_id
  * @param      int $group_id
  * @param      PropelPDO $con
  * @return     sfGuardUserGroup
  */
 public static function retrieveByPK($user_id, $group_id, PropelPDO $con = null)
 {
     $key = serialize(array((string) $user_id, (string) $group_id));
     if (null !== ($obj = sfGuardUserGroupPeer::getInstanceFromPool($key))) {
         return $obj;
     }
     if ($con === null) {
         $con = Propel::getConnection(sfGuardUserGroupPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $criteria = new Criteria(sfGuardUserGroupPeer::DATABASE_NAME);
     $criteria->add(sfGuardUserGroupPeer::USER_ID, $user_id);
     $criteria->add(sfGuardUserGroupPeer::GROUP_ID, $group_id);
     $v = sfGuardUserGroupPeer::doSelect($criteria, $con);
     return !empty($v) ? $v[0] : null;
 }
開發者ID:navid045,項目名稱:maxlaptop,代碼行數:22,代碼來源:BasesfGuardUserGroupPeer.php

示例4: retrieveByPK

 public static function retrieveByPK($user_id, $group_id, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $criteria = new Criteria();
     $criteria->add(sfGuardUserGroupPeer::USER_ID, $user_id);
     $criteria->add(sfGuardUserGroupPeer::GROUP_ID, $group_id);
     $v = sfGuardUserGroupPeer::doSelect($criteria, $con);
     return !empty($v) ? $v[0] : null;
 }
開發者ID:sgrove,項目名稱:cothinker,代碼行數:11,代碼來源:BasesfGuardUserGroupPeer.php


注:本文中的sfGuardUserGroupPeer::doSelect方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。