/** * @return mixed */ public function addAttribute($name, $value) { if (!$this->attributes->offsetExists($name)) { $this->attributes->set($name, $value); } return $this; }
public function offsetExists($offset) { if (null === $this->entries) { $this->__load___(); } return $this->entries->offsetExists($offset); }
/** * 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')); }
/** * 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); }
/** * Check content provider availability by name. * * @param string $name * @return bool */ public function hasContentProvider($name) { return $this->contentProviders->offsetExists($name); }
/** {@inheritDoc} */ public function offsetExists($offset) { $this->initialize(); return $this->collection->offsetExists($offset); }
/** * (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); }
public function offsetExists($offset) { return $this->fields->offsetExists($offset); }