woltlab-compiler
Version:
A compiler for WoltLab-Package Archives and WoltLab-Package Components
23 lines • 862 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("util");
const XMLEditor_1 = require("../../../Serialization/XMLEditor");
const InstructionCompiler_1 = require("./InstructionCompiler");
/**
* Provides the functionality to compile PHP-instructions.
*/
class PHPInstructionCompiler extends InstructionCompiler_1.InstructionCompiler {
/**
* @inheritdoc
*/
Serialize() {
let document = super.Serialize();
let editor = new XMLEditor_1.XMLEditor(document.documentElement);
if (!util_1.isNullOrUndefined(this.Item.Application)) {
editor.SetAttribute("application", this.Item.Application);
}
return document;
}
}
exports.PHPInstructionCompiler = PHPInstructionCompiler;
//# sourceMappingURL=PHPInstructionCompiler.js.map