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:----wTMFaNCwbCj7mIZ+qA3w+sDTyykwBSfN3I2HQWIkNIQILfDdPBmOVcAvB68dFnNJcuXBgR2gr0ZMJQDMf1jOjQvv/V2vto7hhvD7wL0tQXj1zo4F7sbdWABBHPZqcT7FbB065BL0N4hh8xhIUWBJJAXPbEduYYIYnppUqjjseY/1HsXlwKHCH5RLTKfJzNCVIEFTtlzmBpPnZl5hNlDVkP2cRPkluCsPzbKWY4mrGkaP/PVpRCc6HiH72+tf9mnea8347DC9Y8OqJehBXm6EjGaVVN1aBGS2nwepmesnSOtAu8UfmLCGtz0VGhCYEZCX4Mf08RdYhFrt3dfkJPClEIW+S1dU5rkVtI2Eoc6gt6VYNQVlLOLOReYJyAUKrBnQcNXzoRcn39R0wMEE/FGFshzGLjmujmUev/8fACs5eA7ykT+wc6Asc5dLtdDOszQwFw9UYbKDyUkDv4Rdyky60Z5XHcL53U5ie4NW2stJU4BaVjBLZN88fFhmY3A6A0ze96ptV5jeL1ZrWsYHLTJ52n+qPo5geUtsszNsW3sg/z7O/ONhYtg6zNRLW7gzMZyS3psqzeHy/WAzBXXTmlgLPLBhkSpAsfG925Al3oPZqO9KU+Yul2eFvMXKUfDSqe3z53fbDc4O1Z2eSSLxRHj8yiGQGqqWIdJsv8y4M5Lqs5s=----ATTACHMENT:----MTA0NTkxOTA0NzY1MzkxIDEyMjUyMDI3NjUwODMwMDkgMjYxODEwNjk4MTYxNTUxMg==