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


PHP ObjectCollection::toKeyValue方法代碼示例

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


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

示例1: filterByAuthor

 /**
  * Filter the query by a related \Author object.
  * 
  * @param \Author|ObjectCollection $author The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  * @return $this|BookQuery The current query, for fluid interface
  */
 public function filterByAuthor($author, $comparison = null)
 {
     if ($author instanceof \Author) {
         return $this->addUsingAlias(BookEntityMap::COL_AUTHORID, $author->getid(), $comparison);
     } elseif ($author instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(BookEntityMap::COL_AUTHORID, $author->toKeyValue('PrimaryKey', 'id'), $comparison);
     } else {
         throw new PropelException('filterByAuthor() only accepts arguments of type \\Author or Collection');
     }
 }
開發者ID:dracony,項目名稱:forked-php-orm-benchmark,代碼行數:20,代碼來源:BaseBookQuery.php

示例2: filterByMenuI18n

 /**
  * Filter the query by a related \Menu\Model\MenuI18n object
  *
  * @param \Menu\Model\MenuI18n|ObjectCollection $menuI18n The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildMenuI18nVersionQuery The current query, for fluid interface
  */
 public function filterByMenuI18n($menuI18n, $comparison = null)
 {
     if ($menuI18n instanceof \Menu\Model\MenuI18n) {
         return $this->addUsingAlias(MenuI18nVersionTableMap::ID, $menuI18n->getId(), $comparison);
     } elseif ($menuI18n instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(MenuI18nVersionTableMap::ID, $menuI18n->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByMenuI18n() only accepts arguments of type \\Menu\\Model\\MenuI18n or Collection');
     }
 }
開發者ID:AnthonyMeedle,項目名稱:thelia-v2-module-Menu,代碼行數:21,代碼來源:MenuI18nVersionQuery.php

示例3: filterByTranslationApplication

 /**
  * Filter the query by a related \App\Models\TranslationApplication object
  *
  * @param \App\Models\TranslationApplication|ObjectCollection $translationApplication The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildTranslationCatalogQuery The current query, for fluid interface
  */
 public function filterByTranslationApplication($translationApplication, $comparison = null)
 {
     if ($translationApplication instanceof \App\Models\TranslationApplication) {
         return $this->addUsingAlias(TranslationCatalogTableMap::COL_APPLICATION_ID, $translationApplication->getId(), $comparison);
     } elseif ($translationApplication instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TranslationCatalogTableMap::COL_APPLICATION_ID, $translationApplication->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByTranslationApplication() only accepts arguments of type \\App\\Models\\TranslationApplication or Collection');
     }
 }
開發者ID:nstojanovickg,項目名稱:diplomski,代碼行數:23,代碼來源:TranslationCatalogQuery.php

示例4: filterByPermissionGroup

 /**
  * Filter the query by a related \Tekstove\ApiBundle\Model\Acl\PermissionGroup object
  *
  * @param \Tekstove\ApiBundle\Model\Acl\PermissionGroup|ObjectCollection $permissionGroup The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildPermissionGroupUserQuery The current query, for fluid interface
  */
 public function filterByPermissionGroup($permissionGroup, $comparison = null)
 {
     if ($permissionGroup instanceof \Tekstove\ApiBundle\Model\Acl\PermissionGroup) {
         return $this->addUsingAlias(PermissionGroupUserTableMap::COL_GROUP_ID, $permissionGroup->getId(), $comparison);
     } elseif ($permissionGroup instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PermissionGroupUserTableMap::COL_GROUP_ID, $permissionGroup->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByPermissionGroup() only accepts arguments of type \\Tekstove\\ApiBundle\\Model\\Acl\\PermissionGroup or Collection');
     }
 }
開發者ID:Tekstove,項目名稱:Tekstove-api,代碼行數:23,代碼來源:PermissionGroupUserQuery.php

示例5: filterByDiaporama

 /**
  * Filter the query by a related \Diaporamas\Model\Diaporama object
  *
  * @param \Diaporamas\Model\Diaporama|ObjectCollection $diaporama The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildDiaporamaVersionQuery The current query, for fluid interface
  */
 public function filterByDiaporama($diaporama, $comparison = null)
 {
     if ($diaporama instanceof \Diaporamas\Model\Diaporama) {
         return $this->addUsingAlias(DiaporamaVersionTableMap::ID, $diaporama->getId(), $comparison);
     } elseif ($diaporama instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(DiaporamaVersionTableMap::ID, $diaporama->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByDiaporama() only accepts arguments of type \\Diaporamas\\Model\\Diaporama or Collection');
     }
 }
開發者ID:InformatiqueProg,項目名稱:Diaporamas,代碼行數:21,代碼來源:DiaporamaVersionQuery.php

示例6: filterByProduct

 /**
  * Filter the query by a related \Thelia\Model\Product object
  *
  * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildProductVersionQuery The current query, for fluid interface
  */
 public function filterByProduct($product, $comparison = null)
 {
     if ($product instanceof \Thelia\Model\Product) {
         return $this->addUsingAlias(ProductVersionTableMap::ID, $product->getId(), $comparison);
     } elseif ($product instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ProductVersionTableMap::ID, $product->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByProduct() only accepts arguments of type \\Thelia\\Model\\Product or Collection');
     }
 }
開發者ID:alex63530,項目名稱:thelia,代碼行數:21,代碼來源:ProductVersionQuery.php

示例7: filterByVariation

 /**
  * Filter the query by a related \App\Propel\Variation object
  *
  * @param \App\Propel\Variation|ObjectCollection $variation The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildVariationI18nQuery The current query, for fluid interface
  */
 public function filterByVariation($variation, $comparison = null)
 {
     if ($variation instanceof \App\Propel\Variation) {
         return $this->addUsingAlias(VariationI18nTableMap::COL_VARIATION_ID, $variation->getVariationId(), $comparison);
     } elseif ($variation instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(VariationI18nTableMap::COL_VARIATION_ID, $variation->toKeyValue('PrimaryKey', 'VariationId'), $comparison);
     } else {
         throw new PropelException('filterByVariation() only accepts arguments of type \\App\\Propel\\Variation or Collection');
     }
 }
開發者ID:mtornero,項目名稱:slowshop,代碼行數:23,代碼來源:VariationI18nQuery.php

示例8: filterByMatch

 /**
  * Filter the query by a related \Haus23\Dtp\Model\Match object
  *
  * @param \Haus23\Dtp\Model\Match|ObjectCollection $match The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildTipQuery The current query, for fluid interface
  */
 public function filterByMatch($match, $comparison = null)
 {
     if ($match instanceof \Haus23\Dtp\Model\Match) {
         return $this->addUsingAlias(TipTableMap::COL_MATCH_ID, $match->getId(), $comparison);
     } elseif ($match instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TipTableMap::COL_MATCH_ID, $match->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByMatch() only accepts arguments of type \\Haus23\\Dtp\\Model\\Match or Collection');
     }
 }
開發者ID:haus23,項目名稱:dtp.model,代碼行數:23,代碼來源:TipQuery.php

示例9: filterByuserSysRef

 /**
  * Filter the query by a related \Users object
  *
  * @param \Users|ObjectCollection $users The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildBooksQuery The current query, for fluid interface
  */
 public function filterByuserSysRef($users, $comparison = null)
 {
     if ($users instanceof \Users) {
         return $this->addUsingAlias(BooksTableMap::COL___USER__, $users->getId(), $comparison);
     } elseif ($users instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(BooksTableMap::COL___USER__, $users->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByuserSysRef() only accepts arguments of type \\Users or Collection');
     }
 }
開發者ID:Rokfor,項目名稱:rokfor-php-db,代碼行數:23,代碼來源:BooksQuery.php

示例10: filterByReference

 /**
  * Filter the query by a related \gossi\trixionary\model\Reference object
  *
  * @param \gossi\trixionary\model\Reference|ObjectCollection $reference The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildVideoQuery The current query, for fluid interface
  */
 public function filterByReference($reference, $comparison = null)
 {
     if ($reference instanceof \gossi\trixionary\model\Reference) {
         return $this->addUsingAlias(VideoTableMap::COL_REFERENCE_ID, $reference->getId(), $comparison);
     } elseif ($reference instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(VideoTableMap::COL_REFERENCE_ID, $reference->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByReference() only accepts arguments of type \\gossi\\trixionary\\model\\Reference or Collection');
     }
 }
開發者ID:gossi,項目名稱:trixionary,代碼行數:23,代碼來源:VideoQuery.php

示例11: filterByRole

 /**
  * Filter the query by a related \ORM\Role object
  *
  * @param \ORM\Role|ObjectCollection $role The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildNotificationOptionQuery The current query, for fluid interface
  */
 public function filterByRole($role, $comparison = null)
 {
     if ($role instanceof \ORM\Role) {
         return $this->addUsingAlias(NotificationOptionTableMap::COL_ROLE_ID, $role->getId(), $comparison);
     } elseif ($role instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(NotificationOptionTableMap::COL_ROLE_ID, $role->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByRole() only accepts arguments of type \\ORM\\Role or Collection');
     }
 }
開發者ID:AlvaCorp,項目名稱:POS-2,代碼行數:21,代碼來源:NotificationOptionQuery.php

示例12: filterByQuestions

 /**
  * Filter the query by a related \Questions object
  *
  * @param \Questions|ObjectCollection $questions The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildResponsesQuery The current query, for fluid interface
  */
 public function filterByQuestions($questions, $comparison = null)
 {
     if ($questions instanceof \Questions) {
         return $this->addUsingAlias(ResponsesTableMap::COL_QUESTION_ID, $questions->getId(), $comparison);
     } elseif ($questions instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ResponsesTableMap::COL_QUESTION_ID, $questions->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByQuestions() only accepts arguments of type \\Questions or Collection');
     }
 }
開發者ID:menace690,項目名稱:Blue-Economics,代碼行數:21,代碼來源:ResponsesQuery.php

示例13: filterByResource

 /**
  * Filter the query by a related \App\Propel\Resource object
  *
  * @param \App\Propel\Resource|ObjectCollection $resource The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildProductHighlightedQuery The current query, for fluid interface
  */
 public function filterByResource($resource, $comparison = null)
 {
     if ($resource instanceof \App\Propel\Resource) {
         return $this->addUsingAlias(ProductHighlightedTableMap::COL_PRODUCT_HIGHLIGHTED_FOR, $resource->getResourceId(), $comparison);
     } elseif ($resource instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ProductHighlightedTableMap::COL_PRODUCT_HIGHLIGHTED_FOR, $resource->toKeyValue('PrimaryKey', 'ResourceId'), $comparison);
     } else {
         throw new PropelException('filterByResource() only accepts arguments of type \\App\\Propel\\Resource or Collection');
     }
 }
開發者ID:mtornero,項目名稱:slowshop,代碼行數:23,代碼來源:ProductHighlightedQuery.php

示例14: filterByAttributeAv

 /**
  * Filter the query by a related \Thelia\Model\AttributeAv object
  *
  * @param \Thelia\Model\AttributeAv|ObjectCollection $attributeAv The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildAttributeAvI18nQuery The current query, for fluid interface
  */
 public function filterByAttributeAv($attributeAv, $comparison = null)
 {
     if ($attributeAv instanceof \Thelia\Model\AttributeAv) {
         return $this->addUsingAlias(AttributeAvI18nTableMap::ID, $attributeAv->getId(), $comparison);
     } elseif ($attributeAv instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(AttributeAvI18nTableMap::ID, $attributeAv->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByAttributeAv() only accepts arguments of type \\Thelia\\Model\\AttributeAv or Collection');
     }
 }
開發者ID:margery,項目名稱:thelia,代碼行數:21,代碼來源:AttributeAvI18nQuery.php

示例15: filterByOrderAddress

 /**
  * Filter the query by a related \SoColissimo\Model\Thelia\Model\OrderAddress object
  *
  * @param \SoColissimo\Model\Thelia\Model\OrderAddress|ObjectCollection $orderAddress The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildOrderAddressSocolissimoQuery The current query, for fluid interface
  */
 public function filterByOrderAddress($orderAddress, $comparison = null)
 {
     if ($orderAddress instanceof \SoColissimo\Model\Thelia\Model\OrderAddress) {
         return $this->addUsingAlias(OrderAddressSocolissimoTableMap::ID, $orderAddress->getId(), $comparison);
     } elseif ($orderAddress instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(OrderAddressSocolissimoTableMap::ID, $orderAddress->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByOrderAddress() only accepts arguments of type \\SoColissimo\\Model\\Thelia\\Model\\OrderAddress or Collection');
     }
 }
開發者ID:ThomasArnaud,項目名稱:SoColissimo,代碼行數:21,代碼來源:OrderAddressSocolissimoQuery.php


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