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


PHP ArrayCollection::offsetExists方法代碼示例

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


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

示例1: addAttribute

 /**
  * @return mixed
  */
 public function addAttribute($name, $value)
 {
     if (!$this->attributes->offsetExists($name)) {
         $this->attributes->set($name, $value);
     }
     return $this;
 }
開發者ID:nodepub,項目名稱:core,代碼行數:10,代碼來源:Site.php

示例2: offsetExists

 public function offsetExists($offset)
 {
     if (null === $this->entries) {
         $this->__load___();
     }
     return $this->entries->offsetExists($offset);
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:7,代碼來源:AggregateEntryCollection.php

示例3: testOffsetExists

 /**
  * Tests IdentityWrapper->offsetExists()
  */
 public function testOffsetExists()
 {
     foreach (array_keys($this->entries) as $key) {
         $this->assertTrue($this->identityWrapper->offsetExists($key));
         $this->assertFalse($this->wrappedCollection->offsetExists($key));
     }
     $this->assertFalse($this->identityWrapper->offsetExists('non-existent'));
 }
開發者ID:cross-solution,項目名稱:yawik,代碼行數:11,代碼來源:IdentityWrapperTest.php

示例4: hasOxfordable

 /**
  * Test if there is a previous oxfordable word
  * available to the conjunction
  *
  * @param Conjunction $word
  * @return bool
  */
 private function hasOxfordable(Conjunction $word)
 {
     $index = $this->words->indexOf($word);
     return $this->words->offsetExists($index - 1);
 }
開發者ID:epfremmer,項目名稱:PHP-Weekly-Issue28,代碼行數:12,代碼來源:Sentence.php

示例5: hasContentProvider

 /**
  * Check content provider availability by name.
  *
  * @param string $name
  * @return bool
  */
 public function hasContentProvider($name)
 {
     return $this->contentProviders->offsetExists($name);
 }
開發者ID:Maksold,項目名稱:platform,代碼行數:10,代碼來源:ContentProviderManager.php

示例6: offsetExists

 /** {@inheritDoc} */
 public function offsetExists($offset)
 {
     $this->initialize();
     return $this->collection->offsetExists($offset);
 }
開發者ID:nikophil,項目名稱:cmf-tests,代碼行數:6,代碼來源:PersistentCollection.php

示例7: offsetExists

 /**
  * (PHP 5 &gt;= 5.0.0)<br/>
  * Whether a offset exists
  * @link http://php.net/manual/en/arrayaccess.offsetexists.php
  *
  * @param mixed $offset <p>
  *                      An offset to check for.
  *                      </p>
  *
  * @return boolean true on success or false on failure.
  * </p>
  * <p>
  * The return value will be casted to boolean if non-boolean was returned.
  */
 public function offsetExists($offset)
 {
     return $this->collection->offsetExists($offset);
 }
開發者ID:Rybbow,項目名稱:x-blog,代碼行數:18,代碼來源:ImmutableCollection.php

示例8: offsetExists

 public function offsetExists($offset)
 {
     return $this->fields->offsetExists($offset);
 }
開發者ID:tomaszhanc,項目名稱:form-field-bundle,代碼行數:4,代碼來源:FieldCollection.php


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