/** * @param string $identifier * @return boolean */ public function has($identifier) { if (!$this->templateCache instanceof FrontendInterface) { return FALSE; } $identifier = $this->sanitizeIdentifier($identifier); return $this->templateCache->has($identifier); }
/** * 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 */ 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; }
/** * @param string $identifier * @return boolean */ public function has($identifier) { $identifier = $this->sanitizeIdentifier($identifier); return $this->templateCache->has($identifier); }