本文整理汇总了PHP中Propel\Runtime\Collection\ObjectCollection::contains方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectCollection::contains方法的具体用法?PHP ObjectCollection::contains怎么用?PHP ObjectCollection::contains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Propel\Runtime\Collection\ObjectCollection
的用法示例。
在下文中一共展示了ObjectCollection::contains方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testContains
public function testContains()
{
$col = new ObjectCollection();
$book1 = new Book();
$book1->setTitle('Foo');
$book2 = new Book();
$book2->setTitle('Bar');
$col = new ObjectCollection();
$this->assertFalse($col->contains($book1));
$this->assertFalse($col->contains($book2));
$col[] = $book1;
$this->assertTrue($col->contains($book1));
$this->assertFalse($col->contains($book2));
}
示例2: addBet
/**
* Method called to associate a ChildBet object to this object
* through the ChildBet foreign key attribute.
*
* @param ChildBet $l ChildBet
* @return $this|\ApostaAiApi\Models\User The current object (for fluent API support)
*/
public function addBet(ChildBet $l)
{
if ($this->collBets === null) {
$this->initBets();
$this->collBetsPartial = true;
}
if (!$this->collBets->contains($l)) {
$this->doAddBet($l);
if ($this->betsScheduledForDeletion and $this->betsScheduledForDeletion->contains($l)) {
$this->betsScheduledForDeletion->remove($this->betsScheduledForDeletion->search($l));
}
}
return $this;
}
示例3: addRIssuesXmlplugin
/**
* Method called to associate a ChildRIssuesXmlplugin object to this object
* through the ChildRIssuesXmlplugin foreign key attribute.
*
* @param ChildRIssuesXmlplugin $l ChildRIssuesXmlplugin
* @return $this|\Plugins The current object (for fluent API support)
*/
public function addRIssuesXmlplugin(ChildRIssuesXmlplugin $l)
{
if ($this->collRIssuesXmlplugins === null) {
$this->initRIssuesXmlplugins();
$this->collRIssuesXmlpluginsPartial = true;
}
if (!$this->collRIssuesXmlplugins->contains($l)) {
$this->doAddRIssuesXmlplugin($l);
if ($this->rIssuesXmlpluginsScheduledForDeletion and $this->rIssuesXmlpluginsScheduledForDeletion->contains($l)) {
$this->rIssuesXmlpluginsScheduledForDeletion->remove($this->rIssuesXmlpluginsScheduledForDeletion->search($l));
}
}
return $this;
}
示例4:
/**
* Method called to associate a Childтипытехникимтр object to this object
* through the Childтипытехникимтр foreign key attribute.
*
* @param Childтипытехникимтр $l Childтипытехникимтр
* @return $this|\отображаемыетипытехникимтр The current object (for fluent API support)
*/
public function addтипытехникимтр(Childтипытехникимтр $l)
{
if ($this->collтипытехникимтрs === null) {
$this->initтипытехникимтрs();
$this->collтипытехникимтрsPartial = true;
}
if (!$this->collтипытехникимтрs->contains($l)) {
$this->doAddтипытехникимтр($l);
if ($this->�ипытехникимтрsScheduledForDeletion and $this->�ипытехникимтрsScheduledForDeletion->contains($l)) {
$this->�ипытехникимтрsScheduledForDeletion->remove($this->�ипытехникимтрsScheduledForDeletion->search($l));
}
}
return $this;
}
开发者ID:Polymedia,项目名称:BI-Platform-v3,代码行数:21,代码来源:отображаемыетипытехникимтр.php
示例5: addBanRelatedByBannedBy
/**
* Method called to associate a ChildBan object to this object
* through the ChildBan foreign key attribute.
*
* @param ChildBan $l ChildBan
* @return $this|\Models\User The current object (for fluent API support)
*/
public function addBanRelatedByBannedBy(ChildBan $l)
{
if ($this->collBansRelatedByBannedBy === null) {
$this->initBansRelatedByBannedBy();
$this->collBansRelatedByBannedByPartial = true;
}
if (!$this->collBansRelatedByBannedBy->contains($l)) {
$this->doAddBanRelatedByBannedBy($l);
if ($this->bansRelatedByBannedByScheduledForDeletion and $this->bansRelatedByBannedByScheduledForDeletion->contains($l)) {
$this->bansRelatedByBannedByScheduledForDeletion->remove($this->bansRelatedByBannedByScheduledForDeletion->search($l));
}
}
return $this;
}
示例6: addLyricLanguage
/**
* Method called to associate a LyricLanguage object to this object
* through the LyricLanguage foreign key attribute.
*
* @param LyricLanguage $l LyricLanguage
* @return $this|\Tekstove\ApiBundle\Model\Language The current object (for fluent API support)
*/
public function addLyricLanguage(LyricLanguage $l)
{
if ($this->collLyricLanguages === null) {
$this->initLyricLanguages();
$this->collLyricLanguagesPartial = true;
}
if (!$this->collLyricLanguages->contains($l)) {
$this->doAddLyricLanguage($l);
if ($this->lyricLanguagesScheduledForDeletion and $this->lyricLanguagesScheduledForDeletion->contains($l)) {
$this->lyricLanguagesScheduledForDeletion->remove($this->lyricLanguagesScheduledForDeletion->search($l));
}
}
return $this;
}
示例7: addTask
/**
* Method called to associate a ChildTask object to this object
* through the ChildTask foreign key attribute.
*
* @param ChildTask $l ChildTask
* @return $this|\Project The current object (for fluent API support)
*/
public function addTask(ChildTask $l)
{
if ($this->collTasks === null) {
$this->initTasks();
$this->collTasksPartial = true;
}
if (!$this->collTasks->contains($l)) {
$this->doAddTask($l);
if ($this->tasksScheduledForDeletion and $this->tasksScheduledForDeletion->contains($l)) {
$this->tasksScheduledForDeletion->remove($this->tasksScheduledForDeletion->search($l));
}
}
return $this;
}
示例8: addDeliveryTypeI18n
/**
* Method called to associate a ChildDeliveryTypeI18n object to this object
* through the ChildDeliveryTypeI18n foreign key attribute.
*
* @param ChildDeliveryTypeI18n $l ChildDeliveryTypeI18n
* @return $this|\App\Propel\DeliveryType The current object (for fluent API support)
*/
public function addDeliveryTypeI18n(ChildDeliveryTypeI18n $l)
{
if ($l && ($locale = $l->getLocale())) {
$this->setLocale($locale);
$this->currentTranslations[$locale] = $l;
}
if ($this->collDeliveryTypeI18ns === null) {
$this->initDeliveryTypeI18ns();
$this->collDeliveryTypeI18nsPartial = true;
}
if (!$this->collDeliveryTypeI18ns->contains($l)) {
$this->doAddDeliveryTypeI18n($l);
if ($this->deliveryTypeI18nsScheduledForDeletion and $this->deliveryTypeI18nsScheduledForDeletion->contains($l)) {
$this->deliveryTypeI18nsScheduledForDeletion->remove($this->deliveryTypeI18nsScheduledForDeletion->search($l));
}
}
return $this;
}
示例9:
/**
* Method called to associate a ChildПредписания object to this object
* through the ChildПредписания foreign key attribute.
*
* @param ChildПредписания $l ChildПредписания
* @return $this|\СтатусыЗаявкиЗавершение The current object (for fluent API support)
*/
public function addПредписания(ChildПредписания $l)
{
if ($this->collПредписанияs === null) {
$this->initПредписанияs();
$this->collПредписанияsPartial = true;
}
if (!$this->collПредписанияs->contains($l)) {
$this->doAddПредписания($l);
if ($this->�редписанияsScheduledForDeletion and $this->�редписанияsScheduledForDeletion->contains($l)) {
$this->�редписанияsScheduledForDeletion->remove($this->�редписанияsScheduledForDeletion->search($l));
}
}
return $this;
}
示例10:
/**
* Method called to associate a Childфизическиеобъёмы object to this object
* through the Childфизическиеобъёмы foreign key attribute.
*
* @param Childфизическиеобъёмы $l Childфизическиеобъёмы
* @return $this|\типыработ The current object (for fluent API support)
*/
public function addфизическиеобъёмы(Childфизическиеобъёмы $l)
{
if ($this->collфизическиеобъёмыs === null) {
$this->initфизическиеобъёмыs();
$this->collфизическиеобъёмыsPartial = true;
}
if (!$this->collфизическиеобъёмыs->contains($l)) {
$this->doAddфизическиеобъёмы($l);
if ($this->�изическиеобъёмыsScheduledForDeletion and $this->�изическиеобъёмыsScheduledForDeletion->contains($l)) {
$this->�изическиеобъёмыsScheduledForDeletion->remove($this->�изическиеобъёмыsScheduledForDeletion->search($l));
}
}
return $this;
}
示例11: addRating
/**
* Method called to associate a ChildRating object to this object
* through the ChildRating foreign key attribute.
*
* @param ChildRating $l ChildRating
* @return $this|\Models\Comment The current object (for fluent API support)
*/
public function addRating(ChildRating $l)
{
if ($this->collRatings === null) {
$this->initRatings();
$this->collRatingsPartial = true;
}
if (!$this->collRatings->contains($l)) {
$this->doAddRating($l);
if ($this->ratingsScheduledForDeletion and $this->ratingsScheduledForDeletion->contains($l)) {
$this->ratingsScheduledForDeletion->remove($this->ratingsScheduledForDeletion->search($l));
}
}
return $this;
}
示例12:
/**
* Method called to associate a Childмобилизацияпомесяцам object to this object
* through the Childмобилизацияпомесяцам foreign key attribute.
*
* @param Childмобилизацияпомесяцам $l Childмобилизацияпомесяцам
* @return $this|\типытехникимобилизация The current object (for fluent API support)
*/
public function addмобилизацияпомесяцам(Childмобилизацияпомесяцам $l)
{
if ($this->collмобилизацияпомесяцамs === null) {
$this->initмобилизацияпомесяцамs();
$this->collмобилизацияпомесяцамsPartial = true;
}
if (!$this->collмобилизацияпомесяцамs->contains($l)) {
$this->doAddмобилизацияпомесяцам($l);
if ($this->�обилизацияпомесяцамsScheduledForDeletion and $this->�обилизацияпомесяцамsScheduledForDeletion->contains($l)) {
$this->�обилизацияпомесяцамsScheduledForDeletion->remove($this->�обилизацияпомесяцамsScheduledForDeletion->search($l));
}
}
return $this;
}
示例13: addWishlistProduct
/**
* Method called to associate a ChildWishlistProduct object to this object
* through the ChildWishlistProduct foreign key attribute.
*
* @param ChildWishlistProduct $l ChildWishlistProduct
* @return $this|\App\Propel\Wishlist The current object (for fluent API support)
*/
public function addWishlistProduct(ChildWishlistProduct $l)
{
if ($this->collWishlistProducts === null) {
$this->initWishlistProducts();
$this->collWishlistProductsPartial = true;
}
if (!$this->collWishlistProducts->contains($l)) {
$this->doAddWishlistProduct($l);
if ($this->wishlistProductsScheduledForDeletion and $this->wishlistProductsScheduledForDeletion->contains($l)) {
$this->wishlistProductsScheduledForDeletion->remove($this->wishlistProductsScheduledForDeletion->search($l));
}
}
return $this;
}
示例14: addArtistLyric
/**
* Method called to associate a ArtistLyric object to this object
* through the ArtistLyric foreign key attribute.
*
* @param ArtistLyric $l ArtistLyric
* @return $this|\Tekstove\ApiBundle\Model\Artist The current object (for fluent API support)
*/
public function addArtistLyric(ArtistLyric $l)
{
if ($this->collArtistLyrics === null) {
$this->initArtistLyrics();
$this->collArtistLyricsPartial = true;
}
if (!$this->collArtistLyrics->contains($l)) {
$this->doAddArtistLyric($l);
if ($this->artistLyricsScheduledForDeletion and $this->artistLyricsScheduledForDeletion->contains($l)) {
$this->artistLyricsScheduledForDeletion->remove($this->artistLyricsScheduledForDeletion->search($l));
}
}
return $this;
}
示例15: addResource
/**
* Method called to associate a ChildResource object to this object
* through the ChildResource foreign key attribute.
*
* @param ChildResource $l ChildResource
* @return $this|\App\Propel\ResourceType The current object (for fluent API support)
*/
public function addResource(ChildResource $l)
{
if ($this->collResources === null) {
$this->initResources();
$this->collResourcesPartial = true;
}
if (!$this->collResources->contains($l)) {
$this->doAddResource($l);
if ($this->resourcesScheduledForDeletion and $this->resourcesScheduledForDeletion->contains($l)) {
$this->resourcesScheduledForDeletion->remove($this->resourcesScheduledForDeletion->search($l));
}
}
return $this;
}