/** * @test Collection::remove() */ public function testRemove() { $this->buildEnvironment(); $expect = $this->source; unset($expect['a1']); $result = $this->collection->remove('a1')->fetch(); $this->assertEquals($expect, $result); }
/** * @{@inheritdoc} */ public function remove($key) { $return = parent::remove($key); if ($return) { $this->removeFromHistory($return); } return $return; }
public function remove($product) { parent::remove($product); //check if the item is in the quantity map, and remove if so if (array_key_exists($product->id, $this->quantity_product_map)) { unset($this->quantity_product_map[$product->id]); } }
/** * / * @param [type] $id [description] * @return [type] [description] */ public function remove($id) { if (!is_string($id)) { throw new \Exception("Cookie index must be string", 02); } $newId = str_replace('.', '_', $id); setcookie($newId, '', time() - 3600); parent::remove($newId); }
/** * {@inheritdoc} */ public function remove($key) { $this->initialize(); $removed = $this->coll->remove($key); if ($removed) { $this->changed(); if ($this->mapping !== null && isset($this->mapping['embedded'])) { $this->uow->scheduleOrphanRemoval($removed); } } return $removed; }
/** * @param $index */ public function remove($index) { $this->discounts->remove($index); }
public function testHasKeyRemoveClearIndexes() { $this->assertEquals(true, $this->collection->hasKey(3)); $this->collection->remove(3); $this->assertEquals(false, $this->collection->hasKey(3)); }
/** * Remove an instance from the list and from the corresponding group * * @param string $identifier * @return void */ public function remove($identifier) { parent::remove($identifier); /** @var PropertyGroup $group */ foreach ($this->groups as $group) { if ($group->has($identifier)) { $group->remove($identifier); return; } } }
/** * {@inheritdoc} */ public function remove($key) { // TODO: If the keys are persistent as well (not yet implemented) // and the collection is not initialized and orphanRemoval is // not used we can issue a straight SQL delete/update on the // association (table). Without initializing the collection. $this->_initialize(); $removed = $this->_coll->remove($key); if ($removed) { $this->_changed(); if ($this->_association !== null && $this->_association->isOneToMany() && $this->_association->orphanRemoval) { $this->_em->getUnitOfWork()->scheduleOrphanRemoval($removed); } } return $removed; }
/** * Remove header from collection * * @param string $key The case-insensitive header name */ public function remove($key) { parent::remove($this->normalizeKey($key)); }
/** * @inheritDoc */ public function remove($name) { parent::remove($this->normalizeName($name)); }
/** * @access public * @param [type] $id [description] * @return [type] [description] */ public function remove($id) { $id = str_replace('.', '_', $id); unset($_SESSION[$id]); parent::remove($id); }