| 89 | | /** |
|---|
| 90 | | * hand off the work to the phing task of ours, after setting it up |
|---|
| 91 | | * @throws BuildException on validation failure or if the target didn't |
|---|
| 92 | | * execute |
|---|
| 93 | | */ |
|---|
| 94 | | function main() { |
|---|
| 95 | | |
|---|
| 96 | | $this->log("Running PhingCallTask for target '" . $this->subTarget . "'", Project::MSG_DEBUG); |
|---|
| 97 | | if ($this->callee === null) { |
|---|
| 98 | | $this->init(); |
|---|
| 99 | | } |
|---|
| | 78 | /** |
|---|
| | 79 | * If true, pass all properties to the new Phing project. |
|---|
| | 80 | * Defaults to true. Future use. |
|---|
| | 81 | * @param boolean new value |
|---|
| | 82 | */ |
|---|
| | 83 | function setInheritAll($inherit) { |
|---|
| | 84 | $this->inheritAll = (boolean) $inherit; |
|---|
| | 85 | } |
|---|
| 101 | | if ($this->subTarget === null) { |
|---|
| 102 | | throw new BuildException("Attribute target is required.", $this->location); |
|---|
| 103 | | } |
|---|
| 104 | | |
|---|
| 105 | | $this->callee->setPhingfile($this->project->getProperty("phing.file")); |
|---|
| 106 | | $this->callee->setTarget($this->subTarget); |
|---|
| 107 | | $this->callee->setInheritAll($this->inheritAll); |
|---|
| 108 | | $this->callee->setInheritRefs($this->inheritRefs); |
|---|
| 109 | | $this->callee->main(); |
|---|
| 110 | | } |
|---|
| | 87 | /** |
|---|
| | 88 | * If true, pass all references to the new Phing project. |
|---|
| | 89 | * Defaults to false. Future use. |
|---|
| | 90 | * |
|---|
| | 91 | * @param boolean new value |
|---|
| | 92 | */ |
|---|
| | 93 | function setInheritRefs($inheritRefs) { |
|---|
| | 94 | $this->inheritRefs = (boolean) $inheritRefs; |
|---|
| | 95 | } |
|---|
| 112 | | /** |
|---|
| 113 | | * Alias for createProperty |
|---|
| 114 | | * @see createProperty() |
|---|
| 115 | | */ |
|---|
| 116 | | function createParam() { |
|---|
| 117 | | if ($this->callee === null) { |
|---|
| 118 | | $this->init(); |
|---|
| 119 | | } |
|---|
| 120 | | return $this->callee->createProperty(); |
|---|
| 121 | | } |
|---|
| 122 | | |
|---|
| 123 | | /** |
|---|
| 124 | | * Property to pass to the invoked target. |
|---|
| 125 | | */ |
|---|
| 126 | | function createProperty() { |
|---|
| 127 | | if ($this->callee === null) { |
|---|
| 128 | | $this->init(); |
|---|
| 129 | | } |
|---|
| 130 | | return $this->callee->createProperty(); |
|---|
| 131 | | } |
|---|
| | 97 | /** |
|---|
| | 98 | * Alias for createProperty |
|---|
| | 99 | * @see createProperty() |
|---|
| | 100 | */ |
|---|
| | 101 | function createParam() { |
|---|
| | 102 | if ($this->callee === null) { |
|---|
| | 103 | $this->init(); |
|---|
| | 104 | } |
|---|
| | 105 | return $this->callee->createProperty(); |
|---|
| | 106 | } |
|---|
| 133 | | /** |
|---|
| 134 | | * Target to execute, required. |
|---|
| 135 | | */ |
|---|
| 136 | | function setTarget($target) { |
|---|
| 137 | | $this->subTarget = (string) $target; |
|---|
| 138 | | } |
|---|
| | 108 | /** |
|---|
| | 109 | * Property to pass to the invoked target. |
|---|
| | 110 | */ |
|---|
| | 111 | function createProperty() { |
|---|
| | 112 | if ($this->callee === null) { |
|---|
| | 113 | $this->init(); |
|---|
| | 114 | } |
|---|
| | 115 | return $this->callee->createProperty(); |
|---|
| | 116 | } |
|---|
| | 117 | |
|---|
| | 118 | /** |
|---|
| | 119 | * Target to execute, required. |
|---|
| | 120 | */ |
|---|
| | 121 | function setTarget($target) { |
|---|
| | 122 | $this->subTarget = (string) $target; |
|---|
| | 123 | } |
|---|
| | 124 | |
|---|
| | 125 | /** |
|---|
| | 126 | * init this task by creating new instance of the phing task and |
|---|
| | 127 | * configuring it's by calling its own init method. |
|---|
| | 128 | */ |
|---|
| | 129 | function init() { |
|---|
| | 130 | $this->callee = $this->project->createTask("phing"); |
|---|
| | 131 | $this->callee->setOwningTarget($this->getOwningTarget()); |
|---|
| | 132 | $this->callee->setTaskName($this->getTaskName()); |
|---|
| | 133 | $this->callee->setHaltOnFailure(true); |
|---|
| | 134 | $this->callee->setLocation($this->getLocation()); |
|---|
| | 135 | $this->callee->init(); |
|---|
| | 136 | } |
|---|
| | 137 | |
|---|
| | 138 | /** |
|---|
| | 139 | * hand off the work to the phing task of ours, after setting it up |
|---|
| | 140 | * @throws BuildException on validation failure or if the target didn't |
|---|
| | 141 | * execute |
|---|
| | 142 | */ |
|---|
| | 143 | function main() { |
|---|
| | 144 | |
|---|
| | 145 | $this->log("Running PhingCallTask for target '" . $this->subTarget . "'", Project::MSG_DEBUG); |
|---|
| | 146 | if ($this->callee === null) { |
|---|
| | 147 | $this->init(); |
|---|
| | 148 | } |
|---|
| | 149 | |
|---|
| | 150 | if ($this->subTarget === null) { |
|---|
| | 151 | throw new BuildException("Attribute target is required.", $this->getLocation()); |
|---|
| | 152 | } |
|---|
| | 153 | |
|---|
| | 154 | $this->callee->setPhingfile($this->project->getProperty("phing.file")); |
|---|
| | 155 | $this->callee->setTarget($this->subTarget); |
|---|
| | 156 | $this->callee->setInheritAll($this->inheritAll); |
|---|
| | 157 | $this->callee->setInheritRefs($this->inheritRefs); |
|---|
| | 158 | $this->callee->main(); |
|---|
| | 159 | } |
|---|
| | 160 | |
|---|