/** * Deletes data from the container * * @param string $key * * @return boolean */ public function delete($key) { // remove the expiration tracking for this key unset($this->data[static::EXPIRE_DATA_KEY][$key]); // and delete the key itself return parent::delete($this->prefixKey($key)); }
/** * Deletes data from the container * * @param string $key * * @return boolean */ public function delete($key) { // and delete the key itself return parent::delete($this->prefixKey($key)); }
/** * @group Common */ public function testDelete() { $c = new DataContainer(); $this->assertFalse($c->delete('nope')); $c['deep.key'] = true; $this->assertTrue($c->delete('deep.key')); $this->assertFalse($c->delete('deep.key')); $this->assertFalse($c->delete('deep.other')); $this->assertFalse($c->delete('other.key')); }