ClassDiscovery::getFromCache( string $type ): string|null

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Get a value from cache.

Parameters

$typestringrequired

Return

string|null

Source

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'];
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.