コード例 #1
0
ファイル: FlashContainer.php プロジェクト: fuelphp/session
 /**
  * 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));
 }
コード例 #2
0
ファイル: DataContainer.php プロジェクト: fuelphp/session
 /**
  * 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));
 }
コード例 #3
0
ファイル: DataContainerTest.php プロジェクト: fuelphp/common
 /**
  * @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'));
 }