* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ class ListValueElement extends ListComposite { private $value; private $comment; private $isTitle = false; function __construct($value, $comment) { if ($value === null) $this->setTitleFlag(); $this->value = $value; $this->comment = $comment; } function setTitleFlag() { $this->isTitle = true; } function getComment() { return $this->comment; } function getValue() { return $this->value; } function getName() { return "blubb"; } function isHeader() { if (strpos($this->comment, "GNU General Public License") !== false && $this->isTitle) return true; else return false; } function output($level = 0) { if ($this->isTitle) echo "Title: " . $this->comment; else { echo str_pad("='" . $this->value . "'", 60); echo $this->comment . "\n"; } } } ?>