concrete/src/Config/Repository/Repository.php
public function withKey($key, $value, callable $callable)
    {
        $initialValue = $this->get($key);
        try {
            $this->set($key, $value);

            return $callable();
        } finally {
            $this->set($key, $initialValue);
        }
    }
public function withKey($key, $value, callable $callable)
    {
        $initialValue = $this->get($key);
        try {
            $this->set($key, $value);

            return $callable();
        } finally {
            $this->set($key, $initialValue);
        }
    }
public function withKey ( $ key , $ value , callable $ callable ) { $ initialValue = $ this -> get ( $ key ) ; try { $ this -> set ( $ key , $ value ) ; return $ callable ( ) ; } finally { $ this -> set ( $ key , $ initialValue ) ; } }
Execute a callable using a specific key value.

@param string $key
@param mixed $value
@param callable $callable

@return mixed returns the result of $callable
Execute a callable using a specific key value .