Get an extension by its key

@param string $key

@return string|false Full class path to extension
420377
protected function getExtension($key)
    {
        if (array_key_exists($key, $this->extensions)) {
            return $this->extensions[$key];
        }

        return false;
    }
522259
public function get($key)
    {
        $filePath = $this->storageFolder . $key;
        if (file_exists($filePath)) {
            return file_get_contents($filePath);
        }

        return null;
    }
1177321
private function getHeaderPath($key)
    {
        $parts = explode('/', $key, 2);
        if (count($parts) >= 2) {
            list($extId, $configId) = $parts;
            $ext = common_ext_ExtensionsManager::singleton()->getExtensionById($extId);
            return $ext->getDir().'config/header/'.$configId.'.conf.php';
        } else {
            return null;
        }
    }
103230
public function &get($key)
	{
		$out = ($this->exists($key)) ? $this->meta[$key] : false;
		return $out;
	}
403056
protected function getItem($key)
    {
        $cache_file = $this->path($key);
        if (!file_exists($cache_file) || !is_readable($cache_file)) {
            return false;
        }

        $data = file_get_contents($cache_file);
        if (empty($data)) return false;
        $cache_data = unserialize($data);

        if ($cache_data === false) {
            return false;
        }

        $check_expire = $this->checkExpire($cache_data);
        if ($check_expire === false) {
            $this->delete($key);
            return false;
        }

        return $cache_data;
    }
233395
public function offsetGet($key)
    {
        $arr_key = ArrayUtils::implodeIfArray($key, ':');
        if (!isset($this->links[$arr_key])) {
            $this->links[$arr_key] = $this->resolveLinks(
                ArrayUtils::find($this->parameters, $key)
            );
        }

        return $this->links[$arr_key];
    }
775821
protected function getExtension($path)
    {
        $extensions = array_keys($this->extensions);

        return Arr::first($extensions, function ($value) use ($path) {
            return Str::endsWith($path, '.'.$value);
        });
    }
1084059
protected function getFilePathFromKey($key)
    {
        $key = basename($key);
        $badChars = ['-', '.', '_', '\\', '*', '\"', '?', '[', ']', ':', ';', '|', '=', ','];
        $key = str_replace($badChars, '/', $key);
        while (strpos($key, '//') !== false) {
            $key = str_replace('//', '/', $key);
        }

        $directoryToCreate = $this->config['cacheDirectory'];

        $endOfDirectory = strrpos($key, '/');

        if ($endOfDirectory !== false) {
            $directoryToCreate = $this->config['cacheDirectory'].substr($key, 0, $endOfDirectory);
        }

        if (!file_exists($directoryToCreate)) {
            $result = mkdir($directoryToCreate, 0777, true);
            if (!$result) {
                return false;
            }
        }

        $filePath = $this->config['cacheDirectory'].$key.'.'.$this->config['fileExtension'];

        return $filePath;
    }
55753
protected function get($key)
    {
        $this->loadConfigurationLazily();

        if ($this->hasConfigurationValue($key)) {
            $result = $this->configuration[$key];
        } else {
            $result = '';
        }

        return $result;
    }
1186861
public function get($key)
    {
        $md5 = md5($key);
        $folderPath = $this->getFolderPathFromMd5($md5);
        $path = $this->path . self::DS . $folderPath . self::DS . $this->prefix . $md5;
        if (!file_exists($path) || !is_readable($path)) {
            return false;
        }

        $content = file_get_contents($path);
        if (!$content) {
            return false;
        }

        $pieces = explode(PHP_EOL, $content);
        if (!is_array($pieces) || !is_numeric($pieces[0])) {
            unlink($path);
            return false;
        }

        $val = @unserialize($pieces[1]);
        if ($val === false) {
            $this->remove($key);
            return false;
        }

        return $val;
    }
315646
public static function getDescriptionByKey($key)
    {
        $key = strtoupper($key);
        if (isset(self::$availableGroupList[$key])) {
            return self::$availableGroupList[$key];
        } else {
            return false;
        }
    }
324833
public function get($key)
    {
        if (!$this->isEnabled()) {
            return null;
        }

        $value = $this->server->get($this->prefix . $key);

        return false === $value ? null : $value;
    }
653183
private function getKeyPath($key)
    {
        $this->validateKey($key);
        $file = sha1($key);
        $this->hashDirectory->processFile($file);
        return $this->hashDirectory->getFileStoragePath();
    }
346559
public function getLastByKey($key)
    {
        if ($this->key == $key) return $this;

        return $this->children->getLastByKey($key);
    }
267543
public function getFolderFrom($key)
    {
        if (array_key_exists($key, $this->allowedImageFolders)) {
            return $this->allowedImageFolders[$key];
        }

        return false;
    }
825685
public function getExtension($propertyName)
    {
        if (array_key_exists($propertyName, $this->extensions)) {
            return $this->extensions[$propertyName];
        } else {
            return false;
        }
    }
685828
public function getExpiry($key)
    {
        $key = $this->getPrefix().$key;
        if (!$this->isInCache($key)) {
            return false;
        }

        return $this->fetchExpirationFromCache($key);
    }