/** * Remove item from the database * * @param string $key * @param mixed $server * @param mixed $database * @return void * * @throws Exceptions\SaveException */ public function forget($key, $server = null, $database = null) { // remove item from DB $this->dbProvider->forget($key, $server, $database); // remove item from original config $this->origConfig->offsetUnset($key); }
/** * Remove item from the database * * @param string $key * * @return void * * @throws Exceptions\SaveException */ public function forget($key) { // remove item from DB $this->dbProvider->forget($key); // remove item from original config $this->origConfig->offsetUnset($key); }
/** * Remove item from the database * * @param string $key * @param string $environment * * @return void * * @throws Exceptions\SaveException */ public function forget($key, $environment = null) { // Default to the current environment. if (is_null($environment)) { $environment = $this->environment; } list($namespace, $group, $item) = $this->origConfig->parseKey($key); if (is_null($item)) { throw new SaveException('The key should contain a group'); } $collection = $this->getCollection($group, $namespace); $dbkey = $collection . '.' . $item; // remove item from DB $this->dbProvider->forget($dbkey, $environment); // remove item from original config $this->origConfig->offsetUnset($key); }