Esempio n. 1
0
 /**
  * Replace the Operand objects with their evaluations.
  *
  * @param array Array of function closures
  * @param RowInterface $row
  */
 private function replaceColumnOperands($functionMap, RowInterface $row)
 {
     foreach ($this->arguments as $key => $value) {
         if ($value instanceof ColumnOperand) {
             $this->arguments[$key] = $row->getNode($value->getSelectorName())->getPropertyValue($value->getPropertyName());
         }
         if ($value instanceof self) {
             $this->arguments[$key] = $value->execute($functionMap, $row, $value);
         }
     }
 }
Esempio n. 2
0
 /**
  * Update a node indicated in $propertyData in $row
  *
  * @param PHPCR\Query\RowInterface
  * @param array
  */
 public function updateNodeSet(RowInterface $row, $propertyData)
 {
     $node = $row->getNode($propertyData['selector']);
     $value = $propertyData['value'];
     if ($value instanceof FunctionOperand) {
         $value = $propertyData['value'];
         $value = $value->execute($this->functionMapSet, $row);
     }
     $node->setProperty($propertyData['name'], $value);
 }
 /**
  * @param RowInterface $row
  *
  * @return string
  */
 protected function buildSummary(RowInterface $row)
 {
     return substr(strip_tags($row->getValue($this->searchFields['summary'])), 0, 100);
 }