Resolves a key from the bindings array.

@param  string|array $key
@return mixed
326629
public function resolve($key)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $key[$k] = $this->resolve($v);
            }
        } elseif (is_string($key)) {
            $matches = array();
            preg_match_all('/{[\s]*?([^\s]+)[\s]*?}/i', $key, $matches, PREG_SET_ORDER);
            foreach ($matches as $match) {
                if (array_key_exists($match[1], $this->bindings)) {
                    $key = preg_replace('/' . $match[0] . '/', $this->bindings[$match[1]], $key, 1);
                }
            }
        }

        return $key;
    }
143779
public function offsetGet($key)
    {
        if(array_key_exists($key, $this->resolved)) {
            return $this->resolved[$key];
        }

        return $this->make($key);
    }
756798
public static function resolve($key)
    {
        if ($key == 'B') return 0;
        $dict = static::$metric;
        if (preg_match(static::IEC_PATTERN, $key))
            $dict = static::$binary;
        if (array_key_exists($key, $dict)) return $dict[$key];
        throw new UnitNotFoundException(sprintf('Unit "%s" not found', $key));
    }
1069236
private function getValue ($key)
    {
        return isset($this->configuration[$key])
            ? $this->configuration[$key]
            : null;
    }
185912
function findKey( $key )
    {
        $num = $this->keyPick( $key );
        if ( $num >=0 and $num <= count( $this->Handlers ) )
        {
            $handler = $this->Handlers[$num];
            return $handler->findKey( $key );
        }
        $retValue = null;
        return $retValue;
    }
1218576
public function get($key)
    {
        $res = $this->_errors[$key];
        if (!is_array($res)) {
            return [$res];
        }

        return $res;
    }
1082166
public function getKeyValue($key)
    {
        foreach ($this->array as $k => $v) {
            if (strtolower($key) == strtolower($k)) {
                return $v;
            }
        }

        return '';
    }
713501
public function getKey($key)
    {
        $tokens = explode('.', $key);


        $first = array_shift($tokens);
        $first = str_replace('POINT', '.', $first);

        $that = $this;

        $value = $that[$first];

        foreach($tokens as $k) {
            $k = str_replace('POINT', '.', $k);
            if (false === isset($value[$k])) {
                return null;
            }
            $value = $value[$k];
        }

        return $value;
    }
148206
public function getIssueByKey($key)
    {
        if (array_key_exists($key, $this->issues) && isset($this->issues[$key])) {
            return $this->issues[$key];
        }

        return null;
    }
1271048
public function get($key)
    {
        $encoded = $this->redis->get($this->redis->prefix($key));

        // Prevent decoding if redis returns null (key does not exist).
        if ($encoded === null) {
            return null;
        }

        return $this->encoder->decode($encoded);
    }
98107
protected function _getState($key)
    {
        $sKey = (string) $key;

        return array_key_exists($sKey, $this->states)
            ? $this->states[$sKey]
            : null;
    }
34119
public function getBind($key = null)
    {
        if ($key !== null) {
            return isset($this->_bind[$key]) ? $this->_bind[$key] : null;
        } else {
            return $this->_bind;
        }
    }
862497
protected function fetchKey($key)
    {
        if (str_contains($key, '.'))
        {
            $keys = explode('.', $key);
            $search = array_except($keys, 0);

            return array(array_get($keys, 0), implode('.', $search));
        }

        return array($key, null);
    }
253481
public static function key($key)
    {
        $config = static::where('key', $key)->first();

        return $config->value ?? config($key, null);
    }
218849
public function need($key)
    {
        if(!isset($this->resolved[$key])) {
            return $this->make($key);
        }

        return $this->resolved[$key];
    }
1199073
protected function resolveAlias($key)
    {
        if (isset($this->_aliases[$key])) {
            return $this->_aliases[$key];
        }
        return $key;
    }
844220
public function get($key){
        $url = $this->authenticationService->getServerEndPoint() . Endpoints::VERSION . Endpoints::BASE_META . Endpoints::META;

        $result = $this->authenticationService->getTransport()->fetch($url,array("key"=>$key));

        if($result["code"] == APIResponse::RESPONSE_SUCCESS){
            $unwrapped = @json_decode($result['results']['value']);
            $value = $unwrapped === null ? $result['results']['value'] : $unwrapped;
            return array("value" => $value, "validity" => $result['results']['validity']);
        }else{
            return null;
        }
    }