Ejemplo n.º 1
0
 /**
  * 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));
 }
Ejemplo n.º 2
0
 /**
  * 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));
 }
Ejemplo n.º 3
0
 /**
  * @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'));
 }