Check Plugin Info

Unlike with the Phar library, this function only gathers the
release information. Downloads are handled some other way.

@param string $key Key.
@return mixed Details, detail, false.
13909
protected static function check_plugin($key=null) {
		if (\is_null(static::$_plugin)) {
			// Pull the remote info and store it for later.
			if (false === ($remote = static::get_release_info('Info URI', static::PLUGIN_TEMPLATE))) {
				static::$_plugin = false;
				return static::$_plugin;
			}

			// Use the main plugin headers as the basis.
			static::$_plugin = \get_plugin_data(\BLOBCOMMON_INDEX, false, false);

			// And add in what we pulled remotely.
			static::$_plugin['InfoURI'] = $remote['json_uri'];
			static::$_plugin['DownloadVersion'] = $remote['Version'];
			static::$_plugin['DownloadURI'] = $remote['DownloadURI'];
		}

		// Requesting just one key?
		if (! \is_null($key)) {
			return \array_key_exists($key, static::$_plugin) ? static::$_plugin[$key] : false;
		}

		// Send everything!
		return static::$_plugin;
	}
330830
public function getMetaData($key)
    {
        if (!isset($this->metaData[$key])) {
            return false;
        }
        
        return $this->metaData[$key];
    }
735264
public function hasFile($key)
    {
        if ($this->needParser()) {
            $this->treatPutRequest();
            $files = $this->fileParser->getParsed();

            return array_key_exists($key, $files);
        }

        return parent::hasFile($key);
    }
324833
public function get($key)
    {
        if (!$this->isEnabled()) {
            return null;
        }

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

        return false === $value ? null : $value;
    }
1300999
public function get($key)
    {
        if (!$this->hasApc) {
            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }

        $record = apc_fetch($key, $found);
        if ($found) {
            return $record;
        }

        return false;
    }
652697
public function getUpdate($key)
	{
		if (empty($key))
			return false;

		$update =  !empty($_SESSION[$this->_app->name]['update'][$key]) ? $_SESSION[$this->_app->name]['update'][$key] : false;

		if (!empty($update))
			$this->cleanUpdate($key);

		return $update;
	}
305969
public function get($key)
    {
        if ( !$content = $this->info($key) ) {
            return null;
        }

        return $this->unpack($content);
    }
474090
public function getFromCache($key)
    {
        $fileName = $this->getCacheFilePath($key);
        $value = null;
        if (is_readable($fileName)) {
            $value = file_get_contents($fileName);
            if ($value == serialize(false)) {
                return false;
            }

            $value = unserialize($value);
            if ($value === false) {
                $value = null;
            }
        }

        return $value;
    }
963525
public function get($key)
    {
        $filePath = $this->getFilePathFromKey($key);

        if (!file_exists($filePath)) {
            return false;
        }

        if (!is_readable($filePath)) {
            return false;
        }

        $cacheFileData = file_get_contents($filePath);

        if ($this->config['gzipCompression']) {
            try {
                $cacheFileData = gzuncompress($cacheFileData);
            } catch (\Exception $e) {
                $cacheFileData = false;
            }
        }

        // Bail immediately if the file could not be read, or its data could not be uncompressed
        if (!$cacheFileData) {
            return false;
        }

        $cacheObj = json_decode($cacheFileData);

        // Unable to decode JSON
        if ($cacheObj === null) {
            return false;
        }

        // Check cache object format
        if (!isset($cacheObj->content) || !isset($cacheObj->expiryTimestamp)) {
            return false;
        }

        // Check cache content is serialized
        if (!$this->isSerialized($cacheObj->content)) {
            return false;
        }

        if (!function_exists('sys_getloadavg') && $this->config['unixLoadUpperThreshold'] !== -1) {
            throw new Exception('Your PHP installation does not support `sys_getloadavg` (Windows?). Please set `unixLoadUpperThreshold` to `-1` in your DOFileCache config.');
        }

        if ($this->config['unixLoadUpperThreshold'] == -1) {
            $unixLoad = [0 => -PHP_INT_MAX, 1 => -PHP_INT_MAX, 2 => -PHP_INT_MAX];
        } else {
            $unixLoad = sys_getloadavg();
        }

        if ($cacheObj->expiryTimestamp > time() || $unixLoad[0] >= $this->config['unixLoadUpperThreshold']) {
            // Cache item has not yet expired or system load is too high
            return unserialize($cacheObj->content);
        } else {
            // Cache item has expired
            return false;
        }
    }
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;
    }
446020
public function getInfo( $key = NULL )
	{
		if( !$this->info )
			throw new RuntimeException( "No Request has been sent, yet." );
		if( !$key )
			return $this->info;
		if( !array_key_exists( $key, $this->info ) )
			throw new InvalidArgumentException( 'Status Key "'.$key.'" is invalid.' );
		return $this->info[$key];
	}
971575
public function get($key)
  {
    return isset($this->attr[$key]) ? $this->attr[$key] : false;
  }
225306
public function exists($key)
	{
		if(!function_exists('apc_exists')) {
			$success = false;
			$this->fetch($key, $success);
			return $success;
		}
		
		return \apc_exists($key);
	}
1217973
public function get($key)
    {
        $cache_data = $this->getItem($key);
        if ($cache_data === false || !is_array($cache_data)) {
            return false;
        }

        return $cache_data['data'];
    }
189031
public function get($key) {
        if ($this->exists($key)) {
            $key = $this->_encrypt($key);
            $contents = file_get_contents($this->_storage_path . $key);
            
            if (base64_decode($contents, true)) {
                $data = unserialize(base64_decode($contents, true));
            
                return isset($data['data']) ? $data['data'] : '';
            }
        }
        
        return null;
    }
791976
public function get($key) {
		// First, check to see if the result has been cached.
		if (!isset($this->_cache[$key])) {
			return FALSE;
		}

		// Second, check its freshness.
		if ($this->_cache[$key]['time'] < time() - self::$_lifespan) {
			return FALSE;
		}

		return $this->_cache[$key]['data'];
	}
676951
private function load($key)
    {
        $path = $this->getPath($key);

        return file_exists($path) ? file_get_contents($path) : false;
    }