Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ClassDiscovery.php

function ClassDiscovery::getFromCache

Get a value from cache.

Parameters

string $type:

Return value

string|null

1 call to ClassDiscovery::getFromCache()
ClassDiscovery::findOneByType in vendor/php-http/discovery/src/ClassDiscovery.php
Finds a class.

File

vendor/php-http/discovery/src/ClassDiscovery.php, line 104

Class

ClassDiscovery
Registry that based find results on class existence.

Namespace

Http\Discovery

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal