本文整理汇总了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);
}