public function compile()
    {
        $classCount = 0;
        foreach ($this->objectManager->getRegisteredClassNames() as $fullOriginalClassNames) {
            foreach ($fullOriginalClassNames as $fullOriginalClassName) {
                if (isset($this->proxyClasses[$fullOriginalClassName])) {
                    $proxyClassCode = $this->proxyClasses[$fullOriginalClassName]->render();
                    if ($proxyClassCode !== '') {
                        $class = new \ReflectionClass($fullOriginalClassName);
                        $classPathAndFilename = $class->getFileName();
                        $this->cacheOriginalClassFileAndProxyCode($fullOriginalClassName, $classPathAndFilename, $proxyClassCode);
                        $this->storedProxyClasses[str_replace('\\', '_', $fullOriginalClassName)] = true;
                        $classCount++;
                    }
                } else {
                    if ($this->classesCache->has(str_replace('\\', '_', $fullOriginalClassName))) {
                        $this->storedProxyClasses[str_replace('\\', '_', $fullOriginalClassName)] = true;
                    }
                }
            }
        }
        return $classCount;
    }
public function compile()
    {
        $classCount = 0;
        foreach ($this->objectManager->getRegisteredClassNames() as $fullOriginalClassNames) {
            foreach ($fullOriginalClassNames as $fullOriginalClassName) {
                if (isset($this->proxyClasses[$fullOriginalClassName])) {
                    $proxyClassCode = $this->proxyClasses[$fullOriginalClassName]->render();
                    if ($proxyClassCode !== '') {
                        $class = new \ReflectionClass($fullOriginalClassName);
                        $classPathAndFilename = $class->getFileName();
                        $this->cacheOriginalClassFileAndProxyCode($fullOriginalClassName, $classPathAndFilename, $proxyClassCode);
                        $this->storedProxyClasses[str_replace('\\', '_', $fullOriginalClassName)] = true;
                        $classCount++;
                    }
                } else {
                    if ($this->classesCache->has(str_replace('\\', '_', $fullOriginalClassName))) {
                        $this->storedProxyClasses[str_replace('\\', '_', $fullOriginalClassName)] = true;
                    }
                }
            }
        }
        return $classCount;
    }
public function compile ( ) { $ classCount = 0 ; foreach ( $ this -> objectManager -> getRegisteredClassNames ( ) as $ fullOriginalClassNames ) { foreach ( $ fullOriginalClassNames as $ fullOriginalClassName ) { if ( isset ( $ this -> proxyClasses [ $ fullOriginalClassName ] ) ) { $ proxyClassCode = $ this -> proxyClasses [ $ fullOriginalClassName ] -> render ( ) ; if ( $ proxyClassCode !== '' ) { $ class = new \ ReflectionClass ( $ fullOriginalClassName ) ; $ classPathAndFilename = $ class -> getFileName ( ) ; $ this -> cacheOriginalClassFileAndProxyCode ( $ fullOriginalClassName , $ classPathAndFilename , $ proxyClassCode ) ; $ this -> storedProxyClasses [ str_replace ( '\\' , '_' , $ fullOriginalClassName ) ] = true ; $ classCount ++ ; } } else { if ( $ this -> classesCache -> has ( str_replace ( '\\' , '_' , $ fullOriginalClassName ) ) ) { $ this -> storedProxyClasses [ str_replace ( '\\' , '_' , $ fullOriginalClassName ) ] = true ; } } } } return $ classCount ; }
Compiles the configured proxy classes and methods as static PHP code and stores it in the proxy class code cache.
Also builds the static object container which acts as a registry for non-prototype objects during runtime.

@return integer Number of classes which have been compiled
Compiles the configured proxy classes and methods as static PHP code and stores it in the proxy class code cache . Also builds the static object container which acts as a registry for non - prototype objects during runtime .