WordPress\AiClientDependencies\Http\Discovery

ClassDiscovery::getFromCacheprivate staticWP 1.0

Get a value from cache.

Method of the class: ClassDiscovery{}

No Hooks.

Returns

String|null.

Usage

$result = ClassDiscovery::getFromCache( $type );
$type(string) (required)
.

ClassDiscovery::getFromCache() code WP 7.0

private static function getFromCache($type)
{
    if (!isset(self::$cache[$type])) {
        return;
    }
    $candidate = self::$cache[$type];
    if (isset($candidate['condition'])) {
        if (!self::evaluateCondition($candidate['condition'])) {
            return;
        }
    }
    return $candidate['class'];
}