public function saveToCache()
    {
        if ($this->hasFrozenCacheInProduction()) {
            return;
        }
        if (!$this->initialized) {
            $this->initialize();
        }
        if ($this->loadFromClassSchemaRuntimeCache === true) {
            return;
        }

        if (!($this->reflectionDataCompiletimeCache instanceof FrontendInterface)) {
            throw new Exception('A cache must be injected before initializing the Reflection Service.', 1232044697);
        }

        if (!empty($this->availableClassNames)) {
            $this->reflectionDataRuntimeCache->set('__availableClassNames', $this->availableClassNames);
        }

        if ($this->updatedReflectionData !== []) {
            $this->updateReflectionData();
        }

        if ($this->context->isProduction()) {
            $this->saveProductionData();
            return;
        }

        $this->saveDevelopmentData();
    }
public function saveToCache()
    {
        if ($this->hasFrozenCacheInProduction()) {
            return;
        }
        if (!$this->initialized) {
            $this->initialize();
        }
        if ($this->loadFromClassSchemaRuntimeCache === true) {
            return;
        }

        if (!($this->reflectionDataCompiletimeCache instanceof FrontendInterface)) {
            throw new Exception('A cache must be injected before initializing the Reflection Service.', 1232044697);
        }

        if (!empty($this->availableClassNames)) {
            $this->reflectionDataRuntimeCache->set('__availableClassNames', $this->availableClassNames);
        }

        if ($this->updatedReflectionData !== []) {
            $this->updateReflectionData();
        }

        if ($this->context->isProduction()) {
            $this->saveProductionData();
            return;
        }

        $this->saveDevelopmentData();
    }
public function saveToCache ( ) { if ( $ this -> hasFrozenCacheInProduction ( ) ) { return ; } if ( ! $ this -> initialized ) { $ this -> initialize ( ) ; } if ( $ this -> loadFromClassSchemaRuntimeCache === true ) { return ; } if ( ! ( $ this -> reflectionDataCompiletimeCache instanceof FrontendInterface ) ) { throw new Exception ( 'A cache must be injected before initializing the Reflection Service.' , 1232044697 ) ; } if ( ! empty ( $ this -> availableClassNames ) ) { $ this -> reflectionDataRuntimeCache -> set ( '__availableClassNames' , $ this -> availableClassNames ) ; } if ( $ this -> updatedReflectionData !== [ ] ) { $ this -> updateReflectionData ( ) ; } if ( $ this -> context -> isProduction ( ) ) { $ this -> saveProductionData ( ) ; return ; } $ this -> saveDevelopmentData ( ) ; }
Exports the internal reflection data into the ReflectionData cache

This method is triggered by a signal which is connected to the bootstrap's
shutdown sequence.

If the reflection data has previously been loaded from the runtime cache,
saving it is omitted as changes are not expected.

In Production context the whole cache is written at once and then frozen in
order to be consistent. Frozen cache data in Development is only produced for
classes contained in frozen packages.

@return void
@throws Exception if no cache has been injected
Exports the internal reflection data into the ReflectionData cache