public function perform()
 {
     parent::perform();
     if (!$this->isResultSet()) {
         $this->setResultFromBool(true);
     }
     return $this;
 }
 public function perform()
 {
     if (empty($this->locator->getReferenceList())) {
         throw new EvaluatorException("Data root can't be removed");
     }
     parent::perform();
     if ($this->writer->isElement()) {
         $this->writer->removeElement();
     } elseif ($this->writer->isProperty()) {
         $this->writer->removeProperty();
     } else {
         throw new LogicException("Failed to remove data at '{$this->locator->getText()}'");
     }
     return $this;
 }
Esempio n. 3
0
 public function perform()
 {
     parent::perform();
     if ($this->writer->hasData()) {
         if ($this->writer->isElement()) {
             $this->writer->insertElement($this->valueReader);
         } else {
             $this->writer->replaceData($this->valueReader);
         }
     } else {
         if ($this->writer->isNewElement()) {
             $this->writer->appendElement($this->valueReader);
         } elseif ($this->writer->isProperty()) {
             $this->writer->insertProperty($this->valueReader);
         } else {
             throw new EvaluatorException("No data at {$this->locator->getText()}");
         }
     }
     return $this;
 }
 public function perform()
 {
     parent::perform();
     return $this->setResult($this->selector->getAsReader());
 }