/** * Executes this task. */ public function main() { if ($this->property === null) { throw new BuildException('The property attribute must be specified'); } elseif ($this->list === null) { throw new BuildException('The list attribute must be specified'); } $transform = new AgaviStringtoarrayTransform(); $transform->setInput($this->list); $transform->setDelimiter($this->delimiter); $this->project->setUserProperty($this->property, reset($transform->transform())); }
/** * Executes this target. */ public function main() { if ($this->property === null) { throw new BuildException('The property attribute must be specified'); } if ($this->list === null) { throw new BuildException('The list attribute must be specified'); } if ($this->target === null) { throw new BuildException('The target attribute must be specified'); } $transform = new AgaviStringtoarrayTransform(); $transform->setInput($this->list); $transform->setDelimiter($this->delimiter); foreach ($transform->transform() as $value) { $this->project->setUserProperty($this->property, $value); $task = $this->project->createTask('agavi.execute-target'); $task->setName($this->target); $task->setExceptionsFatal($this->exceptionsFatal); $task->init(); $task->main(); } }