89 $file = $this->htmlDirectory->getDriver()->getRealPathSafety($file);
90 if (!$this->htmlDirectory->isExist($this->getRelativeGeneratedPath($file))) {
104 return $this->htmlDirectory->getAbsolutePath($this->getRelativeGeneratedPath($file));
115 $dir = dirname($file);
121 '#((?:<\?php\s+(?!echo|print|if|elseif|else)[^\?]*)\?>)\s+#',
124 '#(?<!' . implode(
'|', $this->inlineHtmlTags) .
')> <#',
127 '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre|script)\b))*+)' 128 .
'(?:<(?>textarea|pre|script)\b|\z))#',
131 '#(?<!:|\\\\|\'|")//(?!\s*<\!\[)(?!\s*]]>)[^\n\r]*#',
134 '#(?<!:|\'|")//[^\n\r]*(\?>)#',
137 '#(?<!:)//[^\n\r]*(<\?php)[^\n\r]*(\s\?>)[^\n\r]*#',
139 $this->readFactory->create($dir)->readFile(
$fileName)
148 if (!$this->htmlDirectory->isExist()) {
149 $this->htmlDirectory->create();
151 $this->htmlDirectory->writeFile($this->getRelativeGeneratedPath($file), rtrim(
$content));
160 private function getRelativeGeneratedPath($sourcePath)
162 return $this->filesystem->getDirectoryRead(
DirectoryList::ROOT)->getRelativePath($sourcePath);
const TMP_MATERIALIZATION_DIR
__construct(Filesystem $filesystem, Filesystem\Directory\ReadFactory $readFactory)