Example #1
0
 /**
  * Makes this instance in effect a reference to another FileList
  * instance.
  * @param Reference $r
  * @throws BuildException
  */
 public function setRefid(Reference $r)
 {
     if ($this->dir !== null || count($this->filenames) !== 0) {
         throw $this->tooManyAttributes();
     }
     parent::setRefid($r);
 }
Example #2
0
 /**
  * Makes this instance in effect a reference to another PatternSet
  * instance.
  * You must not set another attribute or nest elements inside
  * this element if you make it a reference.
  */
 function setRefid(Reference $r)
 {
     if (!empty($this->includeList) || !empty($this->excludeList)) {
         throw $this->tooManyAttributes();
     }
     parent::setRefid($r);
 }
Example #3
0
 /**
  * Makes this instance in effect a reference to another PatternSet
  * instance.
  * You must not set another attribute or nest elements inside
  * this element if you make it a reference.
  */
 function setRefid(Reference $r)
 {
     if (isset($this->dir) && !is_null($this->dir) || $this->defaultPatterns->hasPatterns()) {
         throw $this->tooManyAttributes();
     }
     if (!empty($this->additionalPatterns)) {
         throw $this->noChildrenAllowed();
     }
     if (!empty($this->selectors)) {
         throw $this->noChildrenAllowed();
     }
     parent::setRefid($r);
 }
Example #4
0
 /**
  * @param Reference $r
  * @throws BuildException
  */
 public function setRefid(Reference $r)
 {
     if (count($this->parameters) !== 0 || $this->className !== null) {
         throw $this->tooManyAttributes();
     }
     $o = $r->getReferencedObject($this->getProject());
     if ($o instanceof PhingFilterReader) {
         $this->setClassName($o->getClassName());
         $this->setClasspath($o->getClassPath());
         foreach ($o->getParams() as $p) {
             $this->addParam($p);
         }
     } else {
         $msg = $r->getRefId() . " doesn\\'t refer to a PhingFilterReader";
         throw new BuildException($msg);
     }
     parent::setRefid($r);
 }
Example #5
0
 /**
  * Make this Mapper instance a reference to another Mapper.
  *
  * You must not set any other attribute if you make it a reference.
  * @param Reference $r
  * @throws BuildException
  */
 public function setRefid(Reference $r)
 {
     if ($this->type !== null || $this->from !== null || $this->to !== null) {
         throw DataType::tooManyAttributes();
     }
     parent::setRefid($r);
 }
Example #6
0
 function setRefid(Reference $r)
 {
     if (count($this->filterReaders) !== 0) {
         throw $this->tooManyAttributes();
     }
     // change this to get the objects from the other reference
     $o = $r->getReferencedObject($this->getProject());
     if ($o instanceof FilterChain) {
         $this->filterReaders = $o->getFilterReaders();
     } else {
         throw new BuildException($r->getRefId() . " doesn't refer to a FilterChain");
     }
     parent::setRefid($r);
 }
Example #7
0
 /**
  * Makes this instance in effect a reference to another Path instance.
  *
  * <p>You must not set another attribute or nest elements inside
  * this element if you make it a reference.</p>
  * @throws BuildException
  */
 public function setRefid(Reference $r)
 {
     if (!empty($this->elements)) {
         throw $this->tooManyAttributes();
     }
     $this->elements[] = $r;
     parent::setRefid($r);
 }