diff --git a/classes/phing/types/CommandlineMarker.php b/classes/phing/types/CommandlineMarker.php index af0a92c9e5..65f0b6fab5 100644 --- a/classes/phing/types/CommandlineMarker.php +++ b/classes/phing/types/CommandlineMarker.php @@ -14,6 +14,8 @@ class CommandlineMarker private $position; private $realPos = -1; private $outer; + private $prefix; + private $suffix; /** * @param Commandline $outer @@ -33,7 +35,7 @@ public function __construct(Commandline $outer, $position) */ public function getPosition() { - if ($this->realPos == -1) { + if ($this->realPos === -1) { $this->realPos = ($this->outer->executable === null ? 0 : 1); for ($i = 0; $i < $this->position; $i++) { $arg = $this->outer->arguments[$i]; @@ -43,4 +45,40 @@ public function getPosition() return $this->realPos; } + + /** + * Set the prefix to be placed in front of the inserted argument. + * + * @param string $prefix fixed prefix string. + */ + public function setPrefix($prefix) + { + $this->prefix = $prefix !== null ? $prefix : ''; + } + + /** + * Get the prefix to be placed in front of the inserted argument. + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Set the suffix to be placed at the end of the inserted argument. + * + * @param string $suffix fixed suffix string. + */ + public function setSuffix($suffix) + { + $this->suffix = $suffix !== null ? $suffix : ''; + } + + /** + * Get the suffix to be placed at the end of the inserted argument. + */ + public function getSuffix() + { + return $this->suffix; + } }