本文整理匯總了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;
}
示例2: offsetExists
public function offsetExists($offset)
{
if (null === $this->entries) {
$this->__load___();
}
return $this->entries->offsetExists($offset);
}
示例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'));
}
示例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);
}
示例5: hasContentProvider
/**
* Check content provider availability by name.
*
* @param string $name
* @return bool
*/
public function hasContentProvider($name)
{
return $this->contentProviders->offsetExists($name);
}
示例6: offsetExists
/** {@inheritDoc} */
public function offsetExists($offset)
{
$this->initialize();
return $this->collection->offsetExists($offset);
}
示例7: offsetExists
/**
* (PHP 5 >= 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);
}
示例8: offsetExists
public function offsetExists($offset)
{
return $this->fields->offsetExists($offset);
}