FluidTYPO3\Flux\Utility\CompatibilityRegistry::get PHP Method

get() public static method

public static get ( string $scope, string | null $version = self::VERSION_DEFAULT, mixed $default = NULL ) : mixed
$scope string
$version string | null
$default mixed
return mixed
    public static function get($scope, $version = self::VERSION_DEFAULT, $default = NULL)
    {
        $value = static::cache(static::$registry, 'registry', $scope, $version);
        if (NULL === $value && $default !== $value) {
            return $default;
        }
        return $value;
    }

Usage Example

Example #1
0
 /**
  * Constructor - takes an array of manifest data in the
  * same structure as in the manifest JSON file, or an
  * extension key in which case the expected manifest
  * is resolved using that and naming convention of the
  * manifest file. Or takes a full path to the manifest
  * file in which case the manifest is read from there.
  *
  * Note: applies CompatibilityRegistry-resolved versioned
  * manifest configuration values immediately.
  *
  * @param mixed $seedArrayOrExtensionKeyOrManifestPath
  */
 public function __construct($seedArrayOrExtensionKeyOrManifestPath)
 {
     if (is_array($seedArrayOrExtensionKeyOrManifestPath)) {
         $this->manifest = $seedArrayOrExtensionKeyOrManifestPath;
     } else {
         $possibleExtensionKey = ExtensionNamingUtility::getExtensionKey($seedArrayOrExtensionKeyOrManifestPath);
         if (ExtensionManagementUtility::isLoaded($possibleExtensionKey)) {
             $this->manifest = $this->loadManifestFile(GeneralUtility::getFileAbsFileName(sprintf('EXT:%s/flux.json', $possibleExtensionKey)));
         } else {
             $this->manifest = $this->loadManifestFile($seedArrayOrExtensionKeyOrManifestPath);
         }
     }
     if (!empty($this->manifest['compatibility'])) {
         $scope = $this->manifest['package'] . '/ManifestOverlay';
         CompatibilityRegistry::register($scope, $this->manifest['compatibility']);
         RecursiveArrayUtility::mergeRecursiveOverrule($this->manifest, CompatibilityRegistry::get($scope));
     }
 }
All Usage Examples Of FluidTYPO3\Flux\Utility\CompatibilityRegistry::get