Stores the current reflection data related to classes of the specified package
in the PrecompiledReflectionData directory for the current context.

This method is used by the package manager.

@param string $packageKey
@return void
185505
public function freezePackageReflection($packageKey)
    {
        if (!$this->initialized) {
            $this->initialize();
        }
        if (empty($this->availableClassNames)) {
            $this->availableClassNames = $this->reflectionDataRuntimeCache->get('__availableClassNames');
        }

        $reflectionData = [
            'classReflectionData' => $this->classReflectionData,
            'classSchemata' => $this->classSchemata,
            'annotatedClasses' => $this->annotatedClasses,
            'classesByMethodAnnotations' => $this->classesByMethodAnnotations
        ];

        $reflectionData['classReflectionData'] = $this->filterArrayByClassesInPackageNamespace($reflectionData['classReflectionData'], $packageKey);
        $reflectionData['classSchemata'] = $this->filterArrayByClassesInPackageNamespace($reflectionData['classSchemata'], $packageKey);
        $reflectionData['annotatedClasses'] = $this->filterArrayByClassesInPackageNamespace($reflectionData['annotatedClasses'], $packageKey);

        $reflectionData['classesByMethodAnnotations'] = isset($reflectionData['classesByMethodAnnotations']) ? $reflectionData['classesByMethodAnnotations'] : [];
        $methodAnnotationsFilters = function ($className) use ($packageKey) {
            return (isset($this->availableClassNames[$packageKey]) && in_array($className, $this->availableClassNames[$packageKey]));
        };

        foreach ($reflectionData['classesByMethodAnnotations'] as $annotationClassName => $classNames) {
            $reflectionData['classesByMethodAnnotations'][$annotationClassName] = array_filter($classNames, $methodAnnotationsFilters);
        }

        $precompiledReflectionStoragePath = $this->getPrecompiledReflectionStoragePath();
        if (!is_dir($precompiledReflectionStoragePath)) {
            Files::createDirectoryRecursively($precompiledReflectionStoragePath);
        }
        $pathAndFilename = $precompiledReflectionStoragePath . $packageKey . '.dat';
        file_put_contents($pathAndFilename, extension_loaded('igbinary') ? igbinary_serialize($reflectionData) : serialize($reflectionData));
    }
122882
public function compile(): void
	{
		// Get teplate contents

		$contents = $this->fileSystem->get($this->template);

		// Compile template

		foreach($this->compileOrder as $method)
		{
			$contents = $this->$method($contents);
		}

		// Store compiled template

		$this->fileSystem->put($this->cachePath . '/' . md5($this->template) . '.php', trim($contents));
	}
535287
public void storeCache() {
        if (cacheOk && cacheRes != null && isDirty) {
            OutputStream out = null;
            try {
                out = cacheRes.putStream();
                PrintWriter writer = new PrintWriter(new OutputStreamWriter(out, "UTF-8"));
                for (SubsystemFeatureDefinitionImpl entry : cachedFeatures.values()) {
                    ImmutableAttributes imAttrs = entry.getImmutableAttributes();
                    ProvisioningDetails provDetails = entry.getProvisioningDetails();

                    if (imAttrs != null && provDetails != null) {
                        FeatureDefinitionUtils.writeAttributes(imAttrs,
                                                               provDetails,
                                                               writer);
                    } else {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "Unable to write out " + entry.getFeatureName() + " to cache because the provisioning "
                                         + "detail: " + provDetails + " or imAttrs: " + imAttrs + " is null");
                        }
                    }
                }
                writer.write("@=");
                writer.write(toFeatureNameList(installedFeatures));
                writer.write(FeatureDefinitionUtils.NL);
                writer.write("-@");
                writer.write(toFeatureNameList(configuredFeatures));
                writer.write(FeatureDefinitionUtils.NL);
                writer.write("-#");
                writer.write(configurationError ? '1' : '0');
                writer.write(FeatureDefinitionUtils.NL);

                for (Map.Entry<File, BadFeature> entry : knownBadFeatures.entrySet()) {
                    writer.write("XX");
                    writeBadManifestEntry(writer, entry.getKey(), entry.getValue());
                    writer.write(FeatureDefinitionUtils.NL);
                }

                writer.flush();
                writer.close();

                isDirty = false; // mark cache as current after it has been saved
            } catch (IOException e) {
                cacheWarning(e);
            } finally {
                FeatureDefinitionUtils.tryToClose(out);
            }
        }
    }
977286
private function fillKey()
    {
        $languages = $this->manager->languages();

        if ($this->languageKey) {
            if (! in_array($this->languageKey, $languages)) {
                $this->error(sprintf('Language (%s) could not be found!', $this->languageKey));

                return;
            }

            // If a language key was specified then we prompt for it only.
            $languages = [$this->languageKey];
        }

        $values = $this->collectValues($languages);

        $this->manager->fillKeys(
            str_replace($this->packageName.'::', '', $this->fileName),
            [$this->key => $values]
        );

        foreach ($values as $languageKey => $value) {
            $this->line("<fg=yellow>{$this->fileName}.{$this->key}:{$languageKey}</> was set to \"<fg=yellow>{$value}</>\" successfully.");
        }
    }
948020
private function isCacheFresh( $cacheKey, \ReflectionClass $class )
	{
		if ( false === $filename = $class->getFileName() )
			return true;

		return $this->cache->fetch( '[C]' . $cacheKey ) >= filemtime( $filename );
	}
961626
public function beforeCompile(): void
	{
		$builder = $this->getContainerBuilder();

		// Register console helper only if console is provided
		$application = $builder->getByType(Application::class, false);

		if ($application !== null) {
			$applicationDef = $builder->getDefinition($application);
			$applicationDef->addSetup(
				new Statement('$service->getHelperSet()->set(?)', [$this->prefix('@configurationHelper')])
			);
		}
	}
863651
void putKey(CmsFlexCacheKey key) {

        if (!isEnabled()) {
            return;
        }
        Object o = m_keyCache.get(key.getResource());
        if (o == null) {
            // No variation map for this resource yet, so create one
            CmsFlexCacheVariation variationMap = new CmsFlexCacheVariation(key);
            m_keyCache.put(key.getResource(), variationMap);
            if (LOG.isDebugEnabled()) {
                LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_ADD_KEY_1, key.getResource()));
            }
        }
        // If != null the key is already in the cache, so we just do nothing
    }
472013
public function initialize(array $packages)
    {
        $this->registeredClassNames = $this->registerClassFiles($packages);
        $this->reflectionService->buildReflectionData($this->registeredClassNames);

        $rawCustomObjectConfigurations = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_OBJECTS);

        $configurationBuilder = new ConfigurationBuilder();
        $configurationBuilder->injectReflectionService($this->reflectionService);
        $configurationBuilder->injectLogger($this->logger);

        $this->objectConfigurations = $configurationBuilder->buildObjectConfigurations($this->registeredClassNames, $rawCustomObjectConfigurations);

        $this->setObjects($this->buildObjectsArray());
    }
272263
public function ClearDiscussionSelections($TransientKey = '') {
      $Session = Gdn::Session();
      if ($Session->ValidateTransientKey($TransientKey))
         Gdn::UserModel()->SaveAttribute($Session->UserID, 'CheckedDiscussions', FALSE);

      Redirect(GetIncomingValue('Target', '/discussions'));
   }
582509
public function isPackageFrozen($packageKey)
    {
        if (!isset($this->packages[$packageKey])) {
            return false;
        }
        $composerName = $this->packages[$packageKey]->getComposerName();

        return (
            $this->bootstrap->getContext()->isDevelopment()
            && isset($this->packageStatesConfiguration['packages'][$composerName]['frozen'])
            && $this->packageStatesConfiguration['packages'][$composerName]['frozen'] === true
        );
    }
87529
public function unfreezePackage($packageKey)
    {
        if (!$this->isPackageFrozen($packageKey)) {
            return;
        }
        if (!isset($this->packages[$packageKey])) {
            return;
        }
        $composerName = $this->packages[$packageKey]->getComposerName();

        $this->bootstrap->getObjectManager()->get(ReflectionService::class)->unfreezePackageReflection($packageKey);

        unset($this->packageStatesConfiguration['packages'][$composerName]['frozen']);
        $this->savePackageStates($this->packageStatesConfiguration);
    }
388405
public function itemsCommand($format = 'json', $packageKey = null)
    {
        $sitePackageKey = $packageKey ?: $this->getDefaultSitePackageKey();

        $fusionAst = $this->fusionService->getMergedFusionObjectTreeForSitePackage($sitePackageKey);
        $styleguideObjects = $this->fusionService->getStyleguideObjectsFromFusionAst($fusionAst);

        $this->outputData($styleguideObjects, $format);
    }
48977
public static function tables($extKey)
    {
        if ((TYPO3_MODE === 'BE') && Provider::isGilbertsoft())
        {
            static::registerIcons($extKey);
            static::adaptWarranty($extKey);
            static::adaptLogos($extKey);
        }
    }
862542
public function beforeCompile(): void
	{
		$builder = $this->getContainerBuilder();

		// Register as services
		foreach ($builder->findByType(IContainerAware::class) as $service) {
			$service->addSetup('setContainer');
		}
	}
883216
protected function generateDefaultTemplate($packageKey, $siteName)
    {
        $templatePathAndFilename = 'resource://Neos.SiteKickstarter/Private/Generator/Template/SiteTemplate.html';

        $contextVariables = [
            'siteName' => $siteName,
            'neosViewHelper' => '{namespace neos=Neos\Neos\ViewHelpers}',
            'fusionViewHelper' => '{namespace fusion=Neos\Fusion\ViewHelpers}',
            'siteNodeName' => $this->generateSiteNodeName($packageKey)
        ];

        $fileContent = $this->renderTemplate($templatePathAndFilename, $contextVariables);

        $defaultTemplatePathAndFilename = $this->packageManager->getPackage($packageKey)->getResourcesPath() . 'Private/Templates/Page/Default.html';
        $this->generateFile($defaultTemplatePathAndFilename, $fileContent);
    }
710263
final public static function SetSessionKey( string $key ) : void {
        
        self::SetConfigFromSetter(
                $key,
                self::akSessionKey,
                self::ValidateSessionKey( )
        );
        
    }
372563
public void store(K key, V object) {
		if (isCachingEnabled()) {
			CachedObject<V> co = new CachedObject<V>(object);
			storeCachedObject(key, co);
		}
	}