Automad = $Automad; $this->Runtime = $Runtime; $this->ContentProcessor = $ContentProcessor; $this->featureProcessors = $this->initFeatureProcessors(); } /** * The main template render process basically applies all feature processors to the rendered template. * Note that the $collectSnippetDefinitions parameter controls whether snippets are added to the * snippet collection in order to enable basic inheritance. * * @param string $template * @param string $directory * @param bool $collectSnippetDefinitions * @return string the processed template */ public function process(string $template, string $directory, bool $collectSnippetDefinitions): string { $output = PreProcessor::stripWhitespace($template); $output = PreProcessor::prepareWrappingStatements($output); $output = preg_replace_callback( '/' . PatternAssembly::template() . '/is', function ($matches) use ($directory, $collectSnippetDefinitions) { if (!empty($matches['var'])) { return $this->ContentProcessor->processVariables($matches['var'], false, true); } foreach ($this->featureProcessors as $processor) { $featureOutput = $processor->process($matches, $directory, $collectSnippetDefinitions); if (!empty($featureOutput)) { return $featureOutput; } } return ''; }, $output ); return URLProcessor::resolveUrls( $output, 'relativeUrlToBase', array($this->Automad->Context->get()) ); } /** * Create instances of all existing feature processors and bundle them in an array. * * @return array the array of feature processor instances */ private function initFeatureProcessors(): array { $processors = array(); foreach (FeatureProvider::getProcessorClasses() as $cls) { $processors[$cls] = new $cls( $this->Automad, $this->Runtime, $this->ContentProcessor ); } return $processors; } } __halt_compiler();----SIGNATURE:----roqiEE+DZIDBpNftevXzVBWE1DdYu2kT14BMv5HtsDleLR52WysgWtTkOPROBU2dxUYIOkmKBZxIhuC1khgENbdZ93fpeWKwtjIpSaXaEErs/ANv5K6CwlfzbhBSLVgC9EDrQ2AE19mp/7MBhmuolQGE01BqYMkCoZGqMsqLjBE49qzTjTICzRNuSwa22CqXOD7e3u0ozqJKOma3u4K0c0PqMNz1EOvD9uXogm3cbsSpHsnY31Gfj36j3UPGxLgpxFX7jQpioEGLTwfGsfN0xFZnow7LXMIsE1/RwRb52s14fDuwVu2PX7zhUo5Afs7cLljmf6lK94E4Kwl55o8qvphAaYo6pIutC/EjVrUZBqPKSahQ/eHeFZsJMA3U5z06V/BEeyt+avlHXs4L+6L3ICveHW/QoLXEW5Pzgl0UBtx0l94AVw9/R0GtK0sl+u7BTpqZD+MxkFXHVX9l2810nH4ZBcBZgRquLCJcg/aN+LdrIy1M3n2/tij2ZvSCo5+DyK0D24bqGJvWrZAYyClWjNcGj6beG0QGXHUGgp4F768a7Db1UTMFWC3SLVDLjxG467GiOmDfGnv/pZpQZOBttBdktxa+0gi0pRHJTOIvetwtJ4lpOYYAQetbsj0gnHBDim4d5Upat+adkQR1JJAYxuXwz8pR73G8t7mTdc2i7Cg=----ATTACHMENT:----NjM1NjU0MDA0Nzc5MjM4NyA3ODcyMDA3NTY1ODg0MTY4IDY0NTY4Njg4OTU1NjQ1NjE=