mixed $templateData) * * @link https://github.com/civicrm/composer-compile-plugin/blob/master/doc/tasks.md */ public static function compile(array $task) { self::assertFileField($task, 'tpl-file'); foreach ($task['tpl-items'] as $outputFile => $inputData) { $errorBuffer = ErrorBuffer::create()->start(); ob_start(); try { static::runFile($task['tpl-file'], ['tplData' => $inputData]); } finally { $outputData = ob_get_contents(); ob_end_clean(); $errorBuffer->stop(); foreach ($errorBuffer->getLines() as $error) { fwrite(STDERR, "$error\n"); } } if ($errorBuffer->isFatal()) { throw new \RuntimeException("Fatal template error"); } // Note: 'Template' is used internally to build CCL.php, so don't call CCL::dumpFile(). (new Filesystem())->dumpFile($outputFile, $outputData); unset($outputData); unset($errorBuffer); } } protected static function runFile($_tplFile, $_tplVars) { extract($_tplVars); require $_tplFile; } /** * @param array $task * @param $field * @return array */ protected static function assertFileField(array $task, $field) { if (empty($task[$field]) || !file_exists($task[$field])) { throw new \InvalidArgumentException(sprintf( "Invalid file reference (%s=%s)", $field, $task[$field] ?? 'NULL' )); } return $task; } } __halt_compiler();----SIGNATURE:----hLPCtHWgzu2dqwTSg9SH2X54EYs2Q4vuO/3fJxgzPmlFNAsLygPssoibkKUexvG89NZ0kVM2GGH7logLKcR+TtbGxpTqckhZtHIY3ishopVnbLt3K5gOL9gWFQ41UshTDRes2j7YLCIBoxmSnTkUfZp0FwngGRXQZws6liJK23U94t0+5k6U9MmsT4FMGGz8ws1iA2tJa7YUhkIMx/h8TJFwodgy08apD/olK1XmBSvVcBcu6duq2YtJHIEiPQhKMlaug5wcixGo3NWTqPpbCCd3Sh8BxKVwKO1w+GRAvuQijhJPun43hBFPPhmJmvygDaN7Sly+Zt2Qn2/r2wRAY12r/z6F49Mwcizhvv4nuBvB0yXPP0treYGjcOslUU5urs4jGgru9wfe6tIgXgZ4lGtQZZiEmXmXZNW9+1F58YbbteivDD7s8gIY8zwyqujjHd69zAcfUarUZ9NuoSFqmYh3L9y3bahQ2hVHzME94ptvqpWGOalYACSboymGPVOmmNYCLwKYcio0Culr4DuOu8VvSjbJLQiRqoMc0S+daIfCQrrGAkDArQIDAqm8mAYxC7WdNd8VkoGM8nG7twhnqEdqhg79Y07GvmaOiIdj9QEnsJ4sqF/mjo6Qclqc8ijlSGZx2R09wZFarknseOVJvINjRrtTllNlNwJ04K+XL2k=----ATTACHMENT:----NzY1MjA3MTYxNDQ2MDI0MiAyNDM3NTY3NDQ0NzI4OTkzIDgwOTAwNDgzNDQ3NjQ0MTE=