public function getProxyNamespace() { if ($this->_proxyNamespace === null) { $this->_proxyNamespace = ltrim($this->_baseProxyNamespace . '\\C' . Base32Hex::encode($this->_getProxyDir()), '\\'); } return $this->_proxyNamespace; }
/** * @return ContainerInterface */ protected function getContainerBuilderCached($contextFile, $cacheDir, $isDebug, $loaderFactory) { $contextFile = realpath($contextFile); $className = "c" . Base32Hex::encode($contextFile); $file = $cacheDir . '/' . $className; $containerConfigCache = new ConfigCache($file, $isDebug); if (!$containerConfigCache->isFresh()) { $containerBuilder = $this->buildContainer($contextFile, $loaderFactory); $dumper = new PhpDumper($containerBuilder); $containerConfigCache->write($dumper->dump(array('class' => $className)), $containerBuilder->getResources()); } require_once $file; return new $className(); }
/** * Take a string and make a new string that's safe for use to use in file and class names. * @param string $str * @return string */ protected function _makeSafeStr($str) { // Prefix with a letter to ensure that we meet the rules for PHP class names. return "B" . Utils\Base32Hex::encode($str); }