Gets a connection string from all available sources.

@param string $key The connection string key name

@return string If the key does not exist return null
18059
public static function getConnectionString($key)
    {
        Validate::isString($key, 'key');

        self::_init();
        $value = null;

        foreach (self::$_sources as $source) {
            $value = call_user_func_array($source, [$key]);

            if (!empty($value)) {
                break;
            }
        }

        return $value;
    }
1328887
public function get($key)
    {
        $data = $this->connection()->get($this->prefix.$key);

        if (!is_null($data)) {
            return (is_numeric($data)) ? $data : unserialize($data);
        }
    }
857893
final public function get($key) {
		$res = $this->connection->get($key);
		self::$logger->info(sprintf(
			"Redis: get %s: '%s'.", $key, $res));
		if ($this->redistype == 'predis' && $res == null)
			$res = false;
		return $res;
	}
1221067
public function get($key)
    {
        $filename = $this->getKeyCode($key);

        if ($this->fileExists($filename)) {
            $value = $this->read($filename);
        } else {
            return null;
        }

        return json_decode($value, true);
    }
477793
public static function get($key)
    {
        empty(self::$prefix) && self::$prefix = Config::get('session_prefix');
        return (isset($_SESSION[self::$prefix . $key])) ? $_SESSION[self::$prefix . $key] : null;
    }
1048481
public function get($key)
    {
        if (!$this->has($key)) {
            return null;
        }

        $file = $this->directory . substr(md5($this->prefix() . $key), 0, 10) . '.dat';

        return unserialize(file_get_contents($file));
    }
232817
public function getServer($key = null)
    {
        if ($key === null) {
            return $this->server;
        } else {
            return (isset($this->server[$key])) ? $this->server[$key] : null;
        }
    }
562905
public function get($key)
    {
        if (isset($_SESSION[$this->prefix . $key])) {
            return $_SESSION[$this->prefix . $key];
        }

        return null;
    }
182580
public function get(string $key) {
		return ($content = $this->driver->get($key)) ? static::unserialize($content) : null;
	}
148206
public function getIssueByKey($key)
    {
        if (array_key_exists($key, $this->issues) && isset($this->issues[$key])) {
            return $this->issues[$key];
        }

        return null;
    }
990893
public function getSource($key)
    {
        $unit = $this->searchForId($key);

        $source = $this->getXPathFirstItem('xliff:source', $unit);
        if ($source && $source->firstChild) {
            return $source->firstChild->nodeValue;
        }

        return null;
    }
552808
public function getString($key)
    {
        
        if (array_key_exists($key, $this->dictionary)) {
            return $this->dictionary[$key];
        } else {
            return false;
        }
    }
497452
protected function getConnection($key)
    {
        $offset = crc32($key) % count($this->_globalServers);
        if ($offset < 0) {
            $offset = -$offset;
        }

        if (!isset($this->_globalConnections[$offset]) || feof($this->_globalConnections[$offset])) {
            $connection = stream_socket_client("tcp://{$this->_globalServers[$offset]}", $code, $msg, $this->timeout);
            if (!$connection) {
                throw new \Exception($msg);
            }
            stream_set_timeout($connection, $this->timeout);
            if (class_exists('\Workerman\Lib\Timer') && php_sapi_name() === 'cli') {
                $timer_id = \Workerman\Lib\Timer::add($this->pingInterval, function ($connection) use (&$timer_id) {
                    $buffer = pack('N', 8) . "ping";
                    if (strlen($buffer) !== @fwrite($connection, $buffer)) {
                        @fclose($connection);
                        \Workerman\Lib\Timer::del($timer_id);
                    }
                }, array($connection));
            }
            $this->_globalConnections[$offset] = $connection;
        }
        return $this->_globalConnections[$offset];
    }
1015197
public static function pull($key)
    {
        if (isset($_SESSION[self::$prefix . $key])) {
            $value = $_SESSION[self::$prefix . $key];
            unset($_SESSION[self::$prefix . $key]);

            return $value;
        }

        return null;
    }
406934
public function get(string $key): string
    {
        if (!isset($this->data[$key])) {
            $this->data[$key] = $key;
        }

        return $this->data[$key];
    }
1082503
public function getHeader($key)
    {
        $key = str_replace('-', '_', strtoupper($key));

        if ($this->hasHeader($key)) {
            return $_SERVER[$key];
        }

        if ($this->hasHeader('HTTP_'.$key)) {
            return $_SERVER['HTTP_'.$key];
        }

        return null;
    }
1207279
public function findByKey(string $key) {
        if (!$this->root) {
            return null;
        }

        return $this->root->findByKey($key);
    }